procedure CreatePath(X, Y: Single; FillMode: TPdfFillMode = fmNone; FillColor: TColor = clBlack; FillAlpha: Byte = $FF; Stroke: Boolean = True; StrokeColor: TColor = clBlack; StrokeAlpha: Byte = $FF; StrokeWidth: Single = 1.0; LineCap: TPdfLineCap = lcDefault; LineJoin: TPdfLineJoin = ljDefault; BlendMode: TPdfBlendMode = bmDefault);
| FillMode | TPdfFillMode. Fill rule for the path interior: fmNone (no fill), fmAlternate (even-odd rule), or fmWinding (non-zero winding rule). Default is fmNone. |
| FillColor | TColor. Fill color applied when FillMode is not fmNone. Default is clBlack. |
| FillAlpha | Byte. Dolgunun opaklığı; burada $00 tamamen saydam, $FF tamamen opaktır. Varsayılan değer $FF'tir. |
| Stroke | Boolean. When True, the path outline is drawn using StrokeColor, StrokeAlpha, and StrokeWidth. Default is True. |
| StrokeColor | TColor. Color of the path outline. Default is clBlack. |
| StrokeAlpha | Byte. Çizginin opaklığı; burada $00 tamamen saydam, $FF tamamen opaktır. Varsayılan değer $FF'tir. |
| StrokeWidth | Single. Width of the stroke line in PDF user units (points). Default is 1.0. |
| LineCap | TPdfLineCap. Style applied to open path endpoints: lcDefault, lcButt, lcRound, or lcProjectingSquare. Default is lcDefault. |
| LineJoin | TPdfLineJoin. Style applied at path segment joins: ljDefault, ljMiter, ljRound, or ljBevel. Default is ljDefault. |
| BlendMode | TPdfBlendMode. Compositing blend mode for the path object. Default is bmDefault (normal). |
procedure CreatePath(X, Y, Width, Height: Single; FillMode: TPdfFillMode = fmNone; FillColor: TColor = clBlack; FillAlpha: Byte = $FF; Stroke: Boolean = True; StrokeColor: TColor = clBlack; StrokeAlpha: Byte = $FF; StrokeWidth: Single = 1.0; LineCap: TPdfLineCap = lcDefault; LineJoin: TPdfLineJoin = ljDefault; BlendMode: TPdfBlendMode = bmDefault);
| FillMode | TPdfFillMode. Fill rule for the rectangle interior. Default is fmNone. |
| FillColor | TColor. Fill color for the rectangle. Default is clBlack. |
| FillAlpha | Byte. Opacity of the fill ($00–$FF). Default is $FF. |
| Stroke | Boolean. When True, the rectangle outline is drawn. Default is True. |
| StrokeColor | TColor. Color of the rectangle outline. Default is clBlack. |
| StrokeAlpha | Byte. Opacity of the stroke ($00–$FF). Default is $FF. |
| StrokeWidth | Single. Width of the outline stroke in points. Default is 1.0. |
| LineCap | TPdfLineCap. Line cap style for the rectangle corners. Default is lcDefault. |
| LineJoin | TPdfLineJoin. Line join style for the rectangle corners. Default is ljDefault. |
| BlendMode | TPdfBlendMode. Compositing blend mode. Default is bmDefault. |
CreatePath yeni bir vektör yol nesnesinin oluşturulmasına başlar. MoveTo, LineTo, BezierTo, ClosePath gibi yol oluşturma yöntemlerinden önce çağrılmalıdır ve dizinin AddPath çağrısı ile tamamlanması gerekir; böylece yol geçerli sayfaya işlenir.
İki aşırı yükleme vardır. İki koordinatlı CreatePath(X, Y, ...) biçimi, geçerli noktası (X, Y) olan boş bir yol başlatır; ardından şekli yol segmenti yöntemleriyle serbestçe oluşturursunuz. Dört koordinatlı CreatePath(X, Y, Width, Height, ...) biçimi doğrudan kapalı bir dikdörtgen yol oluşturur — AddPath öncesinde ek segment çağrısı gerekmez.
Yolun tüm görsel özellikleri — dolgu rengi ve kuralı, çizgi rengi, genişlik, opaklık, çizgi ucu, çizgi birleşimi ve karışım modu — isteğe bağlı parametreler aracılığıyla oluşturma anında ayarlanır. Varsayılan değerler, dolgusu olmayan 1 point siyah çizgili bir dış hat üretir.
Aynı anda yalnızca bir yol oluşturulabilir. AddPath çağrılmadan önce CreatePath yeniden çağrılırsa önceki bekleyen yol atılır.
// Draw a filled blue triangle with a 2-pt black outline
Pdf1.NewPage(595, 842);
Pdf1.CreatePath(100, 100, fmWinding, clBlue, $FF, True, clBlack, $FF, 2.0);
Pdf1.LineTo(200, 300);
Pdf1.LineTo(300, 100);
Pdf1.ClosePath;
Pdf1.AddPath;
// Draw a red filled rectangle using the 4-coordinate overload
Pdf1.CreatePath(50, 400, 200, 80, fmWinding, clRed);
Pdf1.AddPath;