Forum > Beginners

TBGRABitmap - resize



--- Code: ---Procedure TForm1.FormPaint(Sender: TObject);
  image :TBGRABitmap;
  GmImage.ResampleFilter := rfMitchell;
  image := GmImage.Resample(clientWidth, clientHeight, rmSimpleStretch) as TBGRABitmap;
  image.draw(canvas,0, 0, [b]true[/b]);;

--- End code ---

I have a white image on wich is painted an orange rectangle.
When i run the program and resize the window, only the rectangle gets many black bars. Im confused !
when i change to

--- Code: ---  image.draw(canvas,0, 0, [b]false[/b]);

--- End code ---

PS: true=opaque; false=transparent

its, there is no bars, but its not orange like i wanted.

how can i omit those bars?


--- Quote ---only the rectangle gets many black bars
--- End quote ---
I don't understand.

Can you post a screenshot of the window?

i think he was confused a lot...

he is just resizing a.bitmap, you can not see the code of drawing the orange rectangle..

maybe is better to use a bgravirtualscreen and draw the white bitmap and the orange rectangle with relative sizes there


[0] Message Index

Go to full version