Recent

Author Topic: TBGRABitmap - resize  (Read 2359 times)

emil

  • New Member
  • *
  • Posts: 16
TBGRABitmap - resize
« on: April 23, 2015, 11:02:29 pm »
Code: [Select]
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; 

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: [Select]
  image.draw(canvas,0, 0, [b]false[/b]);

PS: true=opaque; false=transparent

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

how can i omit those bars?

circular

  • Hero Member
  • *****
  • Posts: 4224
    • Personal webpage
Re: TBGRABitmap - resize
« Reply #1 on: May 01, 2015, 08:48:33 pm »
Quote
only the rectangle gets many black bars
I don't understand.

Can you post a screenshot of the window?
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: TBGRABitmap - resize
« Reply #2 on: May 01, 2015, 10:38:08 pm »
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

 

TinyPortal © 2005-2018