Recent

Author Topic: Why is Canvas.Width <> Image.Width on Resize ?  (Read 1956 times)

FrankBKK

  • New Member
  • *
  • Posts: 31
Why is Canvas.Width <> Image.Width on Resize ?
« on: July 23, 2021, 06:17:46 am »

I'd like to understand why the Canvas Height/Width is not automatically adjusted when an Image is resized.

Is someone able to shed some light on this ?

I had some scaling issues until I figured out the cause for this was the difference between Image.Width and Image.Canvas.Width after resizing

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Why is Canvas.Width <> Image.Width on Resize ?
« Reply #1 on: July 23, 2021, 11:09:33 am »
Hi!

Hands off of Canvas.Width / Canvas.Height. It is an invention of Lazarus and never worked correct. Delphi does ot have that.

Allways use the dimensions of the parent of the canvas.

Winni

FrankBKK

  • New Member
  • *
  • Posts: 31
Re: Why is Canvas.Width <> Image.Width on Resize ?
« Reply #2 on: July 23, 2021, 12:10:56 pm »
Yep, that's pretty much what I figured - just curious about the why  ;-)

 

TinyPortal © 2005-2018