PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.8 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / RenderDirectRectangle Method / RenderDirectRectangle(Unit,Unit,Unit,Unit,LineDef) Method
The horizontal (X) coordinate at which to render the rectangle (cannot be auto).
The vertical (Y) coordinate at which to render the rectangle (cannot be auto).
The width of the rectangle.
The height of the rectangle.
The C1.C1Preview.LineDef to draw the rectangle with.

In This Topic
    RenderDirectRectangle(Unit,Unit,Unit,Unit,LineDef) Method
    In This Topic
    Adds a rectangle to the C1.C1Preview.C1PrintDocument.Body of the current document at a specific position on the current page, and resolves it.
    Syntax
    'Declaration
     
    Public Overloads Sub RenderDirectRectangle( _
       ByVal x As Unit, _
       ByVal y As Unit, _
       ByVal width As Unit, _
       ByVal height As Unit, _
       ByVal line As LineDef _
    ) 
    public void RenderDirectRectangle( 
       Unit x,
       Unit y,
       Unit width,
       Unit height,
       LineDef line
    )

    Parameters

    x
    The horizontal (X) coordinate at which to render the rectangle (cannot be auto).
    y
    The vertical (Y) coordinate at which to render the rectangle (cannot be auto).
    width
    The width of the rectangle.
    height
    The height of the rectangle.
    line
    The C1.C1Preview.LineDef to draw the rectangle with.
    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