summaryrefslogtreecommitdiff
path: root/examples/corelib/canvastest/fpgcanvas.lpr
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-09 15:35:50 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-09 15:35:50 +0200
commit3b6721c900780b16bb032b8e59c1997c5fd12ddd (patch)
tree3a0053b6d52111c732d51cefcd516089f18ef784 /examples/corelib/canvastest/fpgcanvas.lpr
parent441528ff12011732221996990d0a206e610649ed (diff)
downloadfpGUI-3b6721c900780b16bb032b8e59c1997c5fd12ddd.tar.xz
Canvas.DrawString() help.
The coordinates of DrawString is the top/left corner of the string. So the actual text appears below y.
Diffstat (limited to 'examples/corelib/canvastest/fpgcanvas.lpr')
-rw-r--r--examples/corelib/canvastest/fpgcanvas.lpr6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/corelib/canvastest/fpgcanvas.lpr b/examples/corelib/canvastest/fpgcanvas.lpr
index 5db95e09..c5473ba9 100644
--- a/examples/corelib/canvastest/fpgcanvas.lpr
+++ b/examples/corelib/canvastest/fpgcanvas.lpr
@@ -92,6 +92,12 @@ begin
y := 60;
Canvas.SetTextColor(clBlack);
Canvas.DrawString(5, y, 'This text must be black and default font (' + fpgApplication.DefaultFont.FontDesc + ')');
+
+ // red dot indicates top/left corner of where previous text was started
+ Canvas.Pixels[5,y] := clRed;
+// Canvas.DrawLine(5,y-4, 5,y+5);
+// Canvas.DrawLine(1,y, 10, y);
+
Canvas.SetTextColor(clRed);
y := y + Canvas.Font.Height; // fonts are different sizes on differet OS's
Canvas.DrawString(5, y, 'This text must be red.');