Recent

Author Topic: BGRAVirtualScreen  (Read 2663 times)

emil

  • New Member
  • *
  • Posts: 16
BGRAVirtualScreen
« on: May 01, 2015, 08:31:59 pm »
can't understand: how to assign to a BGRAVirtualScreen a bitmap?

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRAVirtualScreen
« Reply #1 on: May 01, 2015, 08:46:16 pm »
It does not work like that.

You can define the OnRedraw event to redraw the bitmap when needed.
Conscience is the debugger of the mind

emil

  • New Member
  • *
  • Posts: 16
Re: BGRAVirtualScreen
« Reply #2 on: May 01, 2015, 08:49:31 pm »
can you give me please an example, im begginer...

emil

  • New Member
  • *
  • Posts: 16
Re: BGRAVirtualScreen
« Reply #3 on: May 01, 2015, 09:21:18 pm »
Code: [Select]
Procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
Begin
  bmp.draw(canvas,0,0);
end;

like that?... it doesnt work -.-

the initial idea was to panit a TBGRABitamp on a panel

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRAVirtualScreen
« Reply #4 on: May 01, 2015, 10:00:27 pm »
For example:
Code: [Select]
Procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
Begin
  Bitmap.Fill(CSSBlue);
end;

would fill the virtual screen with blue.

If you want to draw some image on a panel , then you could use a TBCPanel and in the OnAfterRenderBCPanel event, draw some image on it.

In the form creation, load some image:
Code: [Select]
myImage := TBGRABitmap.Create('some filename');
and in the OnAfterRenderBCPanel event:

Code: [Select]
ABGRA.PutImage(0,0,myImage,dmDrawWithTransparency);
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: BGRAVirtualScreen
« Reply #5 on: May 01, 2015, 10:45:18 pm »
actually bgravirtualscreen is a panel, so you can use it as you use a panel. you dont need another panel  :)

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: BGRAVirtualScreen
« Reply #6 on: May 01, 2015, 11:58:06 pm »
Yep that's true
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018