Textrect in Pixels

  • Hi,

    I draw Text on a TCanvas with TWPPaintEngine. All works well but after I draw the Text on the canvas I want to do some more operations in the rect where the Text was drawn. How can I get the rectangle in pixels of the canvas where the TWPPaintEngine draw the text?

    I've tried this:

    Code
    w := WPPaintEngine.Memo.TextWidth div WPPaintEngine.Memo.CurrentXPixelsPerInch;
              h := WPPaintEngine.Memo.TextHeight div WPPaintEngine.Memo.CurrentYPixelsPerInch;


    but that results to no usefull values.

    Thanks in Advance!

    Regards Markus