A.J. Venter wrote:
Ooooowwww, i undertood you wrong. The TImage should resize, not the
image inside it, since that last works:
http://www.dommelstein.nl/scrap/scale.png
But you want the opposite.
it should be fixed in r11945
This had nothing to do with the changed graphics. Seen the code I
doubt if it had ever worked before.
Here are the scenarios that should actually work.
Imagine I have a file mypicture.png in the same directory as my app,
with dimensions of 500x500.
---------
Scenario 1:
I run:
Var
Img:Timage.
...
Img := TImage.Create;
Img.Parent := Form1; //Etc. until it's visible.
Img.Autosize := True;
Img.Stretch := False;
Img.LoadFromFile('mypicture.png');
Expected result:
Img.Width becomes 500, Img.Height becomes 500, I can see the entire
mypicture.png unscaled - same as if I opened it in my webbrowser.
Status: This always worked before, it stopped working with the last
version I have (I am updating to the latest right now) - this was what
prompted my report.
I understood, but I had to change more than one thing to get it working
again.
----------
Scenario 2:
I do all the same as before BUT:
Img.Stretch := True;
Expected result:
Img.Width and Img.Height are unchanged. MyPicture.Png is SCALED to the
size of Img. If I now change the dimensions of Img, the visible picture
on the screen should resize.
I do NOT know what autosize's value should be for this - but I've tested
with both true and false.
Autosize should be false. The Autosize works on the control size itself.
Once a picture is changed, the control is sized accordinly. Stretch is
something handled when the image is painted, so after the control is
resized.
Status: This has never worked before but it is supposed to if we are to
be compatible with delphi timage. I wasn't really reporting on this -
though I think you originally thought I was. Is this working now ?
Yes, it was one of the changes in the graphics change what got committed
recently. Since there were some issues with it, I thought that you were
reporting someting related.
Anyway, stretching works on all platforms
Marc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives