Recent

Author Topic: TImage.Canvas resize  (Read 14599 times)

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
TImage.Canvas resize
« on: August 31, 2010, 06:25:27 pm »
Hi!

Code: [Select]
FRMMain.IMGMain.Width  := WI.CellSize  + HINT_SPACE_VER;
FRMMain.IMGMain.Height := WI.CellCount * WI.CellSize;
TImage.Width & TImage.Height are changing. But I can`t draw in added area, because TImage.Canvas.Width & TImage.Canvas.Height are not changed (I used a
Code: [Select]
FRMMain.Canvas.TextOut(20,20, IntToStr(FRMMain.IMGMain.Canvas.Width) + ' ' + IntToStr(FRMMain.IMGMain.Canvas.Height));. Results before and after are equal.

If I trying to resize it
Code: [Select]
FRMMain.IMGMain.canvas.Width := WI.CellSize  + HINT_SPACE_VER;I get a error message
Quote
UNTProcs.pas(527,48) Error: No member is provided to access property

Help, please!
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1926
Re: TImage.Canvas resize
« Reply #1 on: September 01, 2010, 12:04:42 am »
You should probably change the Bitmap width:

  Image1.Picture.Bitmap.SetSize(500,500);   

Not 100% sure, but I think it works like this.

Alex Cones

  • Jr. Member
  • **
  • Posts: 73
    • FLSoft
Re: TImage.Canvas resize
« Reply #2 on: September 01, 2010, 05:43:51 am »
EEeeee!!! Man, it`s working!

Thank you!
To beer or not to beer?
_____________________
I`m terribly sorry for my Anglish. :)

 

TinyPortal © 2005-2018