zoukankan      html  css  js  c++  java
  • 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.
    
  • 相关阅读:
    hdu4291 A Short problem
    UVA
    HDU
    Be Geeks!
    HDU
    hdu6559 The Tower
    胜利大逃亡(续) + Maze
    Stealing Harry Potter's Precious
    hdu5172 GTY's gay friends
    Log Concave Sequences Gym
  • 原文地址:https://www.cnblogs.com/del/p/1203548.html
Copyright © 2011-2022 走看看