unit Unit18;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects,
FMX.StdCtrls, FMX.Edit, FMX.Controls.Presentation;
type
TForm18 =
class(TForm)
Image1: TImage;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form18: TForm18;
implementation
{$R *.fmx}
procedure TForm18.Button1Click(Sender: TObject);
begin
with image1.Bitmap.Canvas
do begin
if beginscene
then begin
try
Fill.Color := TAlphaColorRec.red;
FillRect(rectF (20,20, 100,100), 30,30,AllCorners,100);
finally
endscene;
end;
end;
end;
end;
procedure TForm18.Button2Click(Sender: TObject);
begin
image1.Bitmap.SaveToFile('
D:\Test.png');
end;
procedure TForm18.FormCreate(Sender: TObject);
begin
image1.Bitmap.SetSize(Round (image1.Width), Round (image1.Height));
end;
end.