DELPHI XE 10.2.1 FMX 플랫폼에서 그림 쓰는 방법

951 단어 Delphi
unit Unit1;

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.Controls.Presentation, FMX.StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
var
   Rect: TRectF;
begin
   Rect.Create(0, 0, 500, 300);
   Image1.Bitmap.Canvas.BeginScene;
   Image1.Bitmap.Canvas.Font.Family:='  ';
   Image1.Bitmap.Canvas.Font.Size:=80;
   Image1.Bitmap.Canvas.Fill.Color:=TAlphaColors.Red;
   Image1.Bitmap.Canvas.FillText(Rect, '  LQEN', False, 1, [], TTextAlign.Center, TTextAlign.Center );
   Image1.Bitmap.Canvas.EndScene;
end;


end.

좋은 웹페이지 즐겨찾기