本例效果图:

WinAPI: StrokePath - 描绘路径轮廓
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormPaint(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormPaint(Sender: TObject);
var
  DC: HDC;
begin
  Self.Color := clWhite;
  Canvas.Font.Name := '宋体';
  Canvas.Font.Size := 100;
  Canvas.Font.Style := [fsBold, fsItalic];
  Canvas.Pen.Color := clBlue;

  DC := Self.Canvas.Handle;
  BeginPath(DC);
  SetBkMode(DC, TRANSPARENT);
  Canvas.TextOut(10, 10, '博客');
  EndPath(DC);

  StrokePath(DC);
end;

end.

相关文章:

  • 2021-12-23
  • 2021-09-19
  • 2021-09-25
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
  • 2021-08-18
  • 2021-05-28
相关资源
相似解决方案