FlattenPath 和 WidenPath 都能够把路径中的 Bezier 线转换为近似的直线; 不同的是: 用 WidenPath 转换后貌似加宽了线, 其实它是转换成了一个包围路径的新路径(类似区域).
本例效果图:

代码文件:
unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, ExtCtrls;typeTForm1 = class(TForm)RadioGroup1: TRadioGroup;procedure FormPaint(Sender: TObject);procedure FormCreate(Sender: TObject);procedure RadioGroup1Click(Sender: TObject);end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject); beginRadioGroup1.Items.CommaText := 'Path,FlattenPath,WidenPath';RadioGroup1.ItemIndex := 0; end;procedure TForm1.FormPaint(Sender: TObject); typeTPArr = array[0..0] of TPoint;TTArr = array[0..0] of Byte; varpts: ^TPArr;types: ^TTArr;count: Integer;i,x,y: Integer; beginCanvas.Font.Size := 150;Canvas.Font.Style := [fsBold];SetBkMode(Canvas.Handle, TRANSPARENT);BeginPath(Canvas.Handle);Canvas.TextOut(50, 0, 'D');Canvas.Arc(20, 20, 220, 220, 120, 120, 20, 120);EndPath(Canvas.Handle);Canvas.Pen.Width := 6;if RadioGroup1.ItemIndex = 1 then FlattenPath(Canvas.Handle);if RadioGroup1.ItemIndex = 2 then WidenPath(Canvas.Handle);Canvas.Pen.Color := clWhite;count := GetPath(Canvas.Handle, pts^, types^, 0);GetMem(pts, count*SizeOf(TPoint));GetMem(types, count);count := GetPath(Canvas.Handle, pts^, types^, count);Text := '路径中点的总数是: ' + IntToStr(count);StrokePath(Canvas.Handle);Canvas.Brush.Color := clRed;for i := 0 to count - 1 dobeginx := pts^[i].X;y := pts^[i].Y;Canvas.FillRect(Rect(x-1,y-1,x+1,y+1));end;FreeMem(pts);FreeMem(types); end;procedure TForm1.RadioGroup1Click(Sender: TObject); beginRepaint; end;end.窗体文件:
object Form1: TForm1Left = 352Top = 227Caption = 'Form1'ClientHeight = 215ClientWidth = 339Color = clBtnFaceFont.Charset = DEFAULT_CHARSETFont.Color = clWindowTextFont.Height = -11Font.Name = 'Tahoma'Font.Style = []OldCreateOrder = FalsePosition = poDesignedOnCreate = FormCreateOnPaint = FormPaintPixelsPerInch = 96TextHeight = 13object RadioGroup1: TRadioGroupLeft = 240Top = 80Width = 91Height = 127Caption = 'RadioGroup1'TabOrder = 0OnClick = RadioGroup1Clickend end关于描绘路径中的点, 参见: http://www.cnblogs.com/del/archive/2008/05/26/1207423.html