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

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Apr 19 10:53:11 CEST 2012


On Thu, 19 Apr 2012 10:46:20 +0200
Marc Weustink <marc.weustink at cuperus.nl> wrote:

>[...]
> >>> TImage has a published OnPaint event. Painting some overlays makes
> >>> sense. And for this you need to know where the image is on the canvas.
> >>
> >> Who has added this ? Delphi has no OnPaint event.
> >>
> >> Yes, if we have an event, we should provide a way to paint.
> >> But to me this is a can of worms, since stretching is handled internally
> >> while the user event draws on the canvas, independent of the stretching.
> >> If you ask me, I wouldn't have added it.
> >
> > I don't see many worms in the can, so I made it public.
> > It's a useful feature that costs us not much.
> 
> On scaled images there is no way to tell which source pixel corresponds 
> to a destination pixel.

So?

Mattias




More information about the Lazarus mailing list