[Lazarus] TImage - Getting image properties in 'canvas space'

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 16 18:12:32 CEST 2012


Reimar Grabowski <reimgrab at web.de> hat am 16. April 2012 um 16:42 geschrieben:

> Hi,
>
> I load a TLazIntfImage from disk, manipulate it and show it on my form in a
> TImage. Center, Proportional and Stretch properties of the TImage are set to
> true.
> Now I want to draw some overlays onto it (drawing to the canvas in the OnPaint
> event). Therefor I obviously need the origin and dimensions of the loaded
> image in 'canvas space', but I did not find a way to retrieve this
> information. Do I have to calculate them myself or can the TImage give me the
> needed information?


The image is painted to the area defined by the protected method DestRect.
Maybe this can be made public.

At the moment you have to descend your own TImage class to access it or write a
hack class (e.g. via a class helper).

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120416/7f6c81c6/attachment-0003.html>


More information about the Lazarus mailing list