why then font use tocanvas.TextOut is very small?

  • in the demo 《Annotation》,in the function of Paint to Draw text,i find the text is very small,why?


    procedure TWPOAnnotation.Paint(toCanvas : TCanvas; BoundCanvas : TRect;
    ParentTxtObj: TWPTextObj; PaintMode: TWPTextObjectPaintModes);
    var x: Integer;
    begin
    //! OBSOLETE UpdateBoundCanvas;

    toCanvas.Brush.Color := clWhite;
    toCanvas.Brush.Style := bsSolid;
    toCanvas.Pen.Color := clRed;
    toCanvas.Pen.Width := 2;
    toCanvas.Rectangle(
    BoundCanvas.Left,
    BoundCanvas.Top,
    BoundCanvas.Right,
    BoundCanvas.Bottom);
    x := (BoundCanvas.Left + BoundCanvas.Right) div 2;
    toCanvas.MoveTo(x, BoundCanvas.Top + 2);
    toCanvas.LineTo(X+10,BoundCanvas.Bottom - 7);
    toCanvas.LineTo(x, BoundCanvas.Bottom - 7);
    toCanvas.MoveTo(x, BoundCanvas.Bottom - 5);
    toCanvas.LineTo(x, BoundCanvas.Bottom - 4);

    //My Code to Draw text
    toCanvas.Font.Color := clRed;
    toCanvas.Font.Name := 'Times New Roman';
    toCanvas.Font.Size := 20;
    toCanvas.TextOut(BoundCanvas.Left+10,BoundCanvas.Top+50,'Delphi');
    end;

  • if the code used with Image.Canvas,the font Size is correct

    Image1.Canvas.Font.Color := clRed;
    Image1.Canvas.Font.Name := 'Times New Roman';
    Image1.Canvas.Font.Size := 20;
    Image1.Canvas.TextOut(1,2,'Delphi');

    sorry,my english is poor