diff options
Diffstat (limited to 'test/simple/simple.c')
-rw-r--r-- | test/simple/simple.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/test/simple/simple.c b/test/simple/simple.c index e9e3429..c47812e 100644 --- a/test/simple/simple.c +++ b/test/simple/simple.c @@ -559,6 +559,9 @@ void SimpleDraw(cdCanvas* canvas) SimpleUpdateSize(canvas); #endif + /* refresh CD canvas size, when window size has changed */ + cdCanvasActivate(canvas); + if (simple_draw == DRAW_TEXTFONTS) SimpleDrawTextFonts(canvas); else if (simple_draw == DRAW_TEXTALIGN) @@ -568,6 +571,10 @@ void SimpleDraw(cdCanvas* canvas) else SimpleDrawAll(canvas); + /* Adds a new page, or + flushes the file, or + flushes the screen, or + swap the double buffer. */ cdCanvasFlush(canvas); #ifdef USE_OPENGL @@ -712,7 +719,7 @@ void SimpleDrawAll(cdCanvas* canvas) Notice that in some drivers the bounding box is not precise. */ { int rect[8]; - cdCanvasGetTextBounds(canvas, w/2, h/2, "cdMin Draw (çãí)", rect); + cdCanvasGetTextBounds(canvas, w/2, h/2, "Simple Draw (pçãí)", rect); cdCanvasForeground(canvas, CD_RED); cdCanvasBegin(canvas, CD_CLOSED_LINES); cdCanvasVertex(canvas, rect[0], rect[1]); @@ -722,7 +729,7 @@ void SimpleDrawAll(cdCanvas* canvas) cdCanvasEnd(canvas); } cdCanvasForeground(canvas, CD_BLUE); - cdCanvasText(canvas, w/2, h/2, "cdMin Draw (çãí)"); + cdCanvasText(canvas, w/2, h/2, "Simple Draw (pçãí)"); cdCanvasTextOrientation(canvas, 0); /* Prepare World Coordinates */ @@ -965,12 +972,6 @@ void SimpleDrawAll(cdCanvas* canvas) if (use_transform) cdCanvasTransform(canvas, NULL); cdCanvasClip(canvas, CD_CLIPOFF); - - /* Adds a new page, or - flushes the file, or - flushes the screen, or - swap the double buffer. */ - cdCanvasFlush(canvas); } void DrawVectorTextBox(cdCanvas* canvas, int x, int y, char* text) @@ -1081,18 +1082,18 @@ void SimpleDrawTextAlign(cdCanvas* canvas) #if 1 char* text_aligment_str[] = { - "North (Ãyj)\nSecond Line (Ãyj)", - "South (Ãyj)\nSecond Line (Ãyj)", - "East (Ãyj)\nSecond Line (Ãyj)", - "West (Ãyj)\nSecond Line (Ãyj)", - "North East (Ãyj)\nSecond Line (Ãyj)", - "North West (Ãyj)\nSecond Line (Ãyj)", - "South East (Ãyj)\nSecond Line (Ãyj)", - "South West (Ãyj)\nSecond Line (Ãyj)", - "Center (Ãyj)\nSecond Line (Ãyj)", - "Base Center (Ãyj)\nSecond Line (Ãyj)", - "Base Right (Ãyj)\nSecond Line (Ãyj)", - "Base Left (Ãyj)\nSecond Line (Ãyj)" + "North (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "South (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "East (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "West (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "North East (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "North West (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "South East (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "South West (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "Center (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "Base Center (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "Base Right (Ãyj)\nSecond Line (Ãyj)\nThird Line", + "Base Left (Ãyj)\nSecond Line (Ãyj)\nThird Line" }; #else char* text_aligment_str[] = { |