How can I create a WHITE TIEBitmap and draw some colored rectangles on it?
procedure TForm1.Button2Click(Sender: TObject);
var
iIEBitmap: TIEBitmap;
iIEBitmap2: TIEBitmap;
iRect: TRect;
begin
try
{Create a white 500x500 IEBitmap}
iIEBitmap := TIEBitmap.Create;
iIEBitmap.Allocate(500, 500);
iIEBitmap.Fill(clWhite);
{Create a red rect }
iRect := Rect(0, 0, 250, 250);
iIEBitmap.Canvas.Brush.Style := bsSolid;
iIEBitmap.Canvas.Brush.Color := clRed;
iIEBitmap.Canvas.FillRect(iRect);
{Create a green rect }
iRect := Rect(50, 275, 275, 250);
iIEBitmap.Canvas.Brush.Style := bsSolid;
iIEBitmap.Canvas.Brush.Color := clGreen;
iIEBitmap.Canvas.FillRect(iRect);
{Create a blue rect }
iRect := Rect(300, 300, 350, 350);
iIEBitmap.Canvas.Brush.Style := bsSolid;
iIEBitmap.Canvas.Brush.Color := clBlue;
iIEBitmap.Canvas.FillRect(iRect);
try
iIEBitmap2 := TIEBitmap.Create(iIEBitmap);
ImageEnView1.IEBitmap.Assign(iIEBitmap2);
ImageEnView1.Update;
finally
iIEBitmap2.Free;
end;
finally
iIEBitmap.Free;
end;
end;
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development