From e9fa6f1ca5a2fcb793d1a0f0d50c87be200b6f9a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 17 Sep 2012 15:07:23 -0500 Subject: Add preliminary font layout support Add image painting support --- tests/test-painter.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-painter.cpp b/tests/test-painter.cpp index f458e26..fe1939f 100644 --- a/tests/test-painter.cpp +++ b/tests/test-painter.cpp @@ -167,6 +167,12 @@ void runTests(TQPaintDevice* pd) { p.drawPixmap(200, 10, pixmap, 0, 0, -1, -1); } + // Image tests + { + TQImage image("open.png"); + p.drawImage(350, 10, image, 0, 0, -1, -1); + } + // Font tests { p.setPen(TQColor(0,128,255)); @@ -195,8 +201,12 @@ void runTests(TQPaintDevice* pd) { } } - p.setPen(TQColor(255,128,0)); - p.drawText( TQRect(250, 250, 250, 250), 0, TQString("TQt3 renders via Cairo!") ); + //p.setPen(TQColor(255,128,0)); + //p.drawText( TQRect(250, 250, 250, 150), TQt::BreakAnywhere, TQString("TQt3 renders via Cairo!") ); + + //p.setPen(TQColor(255,0,128)); + //p.drawText( TQRect(0, 250, 250, 150), TQt::BreakAnywhere | TQt::AlignCenter, TQString("TQt3 renders via Cairo!") ); + //p.drawText( TQRect(0, 250, 250, 150), TQt::BreakAnywhere | TQt::AlignHCenter | TQt::AlignBottom, TQString("TQt3 renders via Cairo!") ); } // Clipping tests -- cgit v1.2.1