delphi 드로잉

740 단어
procedure TForm1.Button3Click(Sender: TObject);
var
  flag: integer;
  FixRect: TRect;
  no:string;
begin
  PaintBox1.Canvas.Brush.Color := clRed;
  PaintBox1.Canvas.FillRect(PaintBox1.ClientRect);
  PaintBox1.Canvas.Brush.Color := clBlue;

  FixRect := PaintBox1.ClientRect;
  FixRect.Left := FixRect.Left-5;
  FixRect.Top := FixRect.Top-5;
  FixRect.Right := FixRect.Right-10;
  FixRect.Bottom := FixRect.Bottom-10;
  PaintBox1.Canvas.FillRect(FixRect);
  PaintBox1.Canvas.Brush.Color := clYellow;
  no := 'HELLOWORLDHELLOWOR
FJEOJEEJGOEGJOEGJOE'; // Flag := DT_SINGLELINE or DT_RIGHT or DT_CENTER; flag := DT_VCENTER; DrawText(PaintBox1.Canvas.Handle, PChar(No), Length(No), FixRect, Flag); end;

좋은 웹페이지 즐겨찾기