Hi,
Lazarus: ver 1.1
OS: Windows 7/64bit
FPC: ver. 2.7.1
SVN: rev. 39352MP
Have tried to copy the code in "Simple example" for BGRABitmap like:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, BGRABitmap,
BGRABitmapTypes, BGRATransform, BGRAGraphicControl;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormPaint(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
bmp: TBGRABitmap;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
bmp := TBGRABitmap.Create(100,100,BGRABlack); //creates a 100x100 pixels image with black background
bmp.FillRect(20,20,60,60,BGRAWhite, dmSet); //draws a white square without transparency
bmp.FillRect(40,40,80,80,BGRA(0,0,255,128), dmDrawWithTransparency); //draws a transparent blue square
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
bmp.Free;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
bmp.Draw(Canvas, 0, 0, True); // draw the bitmap in opaque mode (faster)
end;
end.
But nothing is displayed.
What am i doing wrong?
Regards
stab
