## 4.3 Painting paths

A path is composed of straight and curved line segments. Paths define shapes and regions.

Vector graphics are drawn by the following steps:

1. Set graphics states (such as line width, dash pattern, color...) using graphics state operators or color operators.
2. Start new path using page:MoveTo(), page:Rectangle(), page:Arc(), or page:Circle().
3. Append to path using path construction operators.
4. Stroke or paint the path using path painting operators.

Here is a list of graphics state operators:

    page:Concat()
    page:SetDash()
    page:SetFlat()
    page:SetLineCap()
    page:SetLineJoin()
    page:SetLineWidth()
    page:SetMiterLimit()

Here is a list of color operators:

    page:SetCMYKFill()
    page:SetCMYKStroke()
    page:SetGrayFill()
    page:SetGrayStroke()
    page:SetRGBFill()
    page:SetRGBStroke()

Here is a list of path construction operators:

    page:Arc()
    page:Circle()
    page:CurveTo()
    page:CurveTo2()
    page:CurveTo3()
    page:LineTo()
    page:MoveTo()
    page:Rectangle()

Here is a list of path painting operators:

    page:ClosePathFillStroke()
    page:ClosePathEofillStroke()
    page:ClosePathStroke()
    page:Eofill()
    page:EofillStroke()
    page:EndPath()
    page:Fill()
    page:FillStroke()
    page:Stroke()

Show TOC