PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.8 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / RenderDirectPolygon Method / RenderDirectPolygon(IEnumerable,LineDef,Color) Method
The collection of C1.C1Preview.UnitPoint objects (an exception occurs if an object that is not a C1.C1Preview.UnitPoint is found in the collection).
The C1.C1Preview.LineDef to draw the polygon with.
The fill color (if empty or transparent, the polygon is closed, otherwise it is open).

In This Topic
    RenderDirectPolygon(IEnumerable,LineDef,Color) Method
    In This Topic
    Creates a C1.C1Preview.RenderPolygon from a collection of C1.C1Preview.UnitPoint objects, and renders it on the current page, at position specified by the points' coordinates.

    If fillColor specifies a non-empty and non-transparent color, the polygon is closed, otherwise it is open.

    Syntax
    'Declaration
     
    Public Overloads Sub RenderDirectPolygon( _
       ByVal points As IEnumerable, _
       ByVal line As LineDef, _
       ByVal fillColor As Color _
    ) 
    public void RenderDirectPolygon( 
       IEnumerable points,
       LineDef line,
       Color fillColor
    )

    Parameters

    points
    The collection of C1.C1Preview.UnitPoint objects (an exception occurs if an object that is not a C1.C1Preview.UnitPoint is found in the collection).
    line
    The C1.C1Preview.LineDef to draw the polygon with.
    fillColor
    The fill color (if empty or transparent, the polygon is closed, otherwise it is open).
    Remarks

    This method can only be used between calls to C1.C1Preview.C1PrintDocument.StartDoc and C1.C1Preview.C1PrintDocument.EndDoc methods on the current document. For details, see C1.C1Preview.C1PrintDocument.RenderDirect.

    See Also