[Lazarus] Loading file into TImageList does not properly scale

Matt Shaffer dazappa.matt at gmail.com
Mon Nov 23 00:16:50 CET 2009


The only rectangle I found when drawing to a canvas was DrawFocusRect(Rect:
TRect); Nothing to do with drawing images, I'm afraid.

On Sun, Nov 22, 2009 at 5:41 PM, Marc Weustink <marc at dommelstein.net> wrote:

> Matt Shaffer wrote:
>
>> Hello, the code below is how I load and convert PNG files into BMPs, add
>> them to a TImageList, and then add them to a TListView. The problem I'm
>> having is that I cannot get the little bugger to scale to 96x96; other than
>> that the code works. I would imagine that setting the timage's stretch
>> property to true ought to scale the image to 96x96, but that was not the
>> case.
>>
>
> TImage does not modify the original image, it only renders itself at the
> given size. IIRC you can pass a drawing rectange when drawing a graphic on a
> canvas.
>
> Marc
>
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20091122/11c1e6d0/attachment-0004.html>


More information about the Lazarus mailing list