Forum > Beginners
TBGRABitmap - resize
(1/1)
emil:
--- Code: ---Procedure TForm1.FormPaint(Sender: TObject);
var
image :TBGRABitmap;
Begin
GmImage.ResampleFilter := rfMitchell;
image := GmImage.Resample(clientWidth, clientHeight, rmSimpleStretch) as TBGRABitmap;
image.draw(canvas,0, 0, [b]true[/b]);
image.free;
end;
--- 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?
circular:
--- Quote ---only the rectangle gets many black bars
--- End quote ---
I don't understand.
Can you post a screenshot of the window?
lainz:
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
Navigation
[0] Message Index