[]
        
(Showing Draft Content)

GrapeCity.Documents.Layout.Composition.Layer.CreateVisual

CreateVisual Method

CreateVisual(bool)

Creates a Visual object that represents a drawing element.

Declaration
public Visual CreateVisual(bool createRect = true)
Parameters
Type Name Description
bool createRect

Indicates whether a new LayoutRect must be associated with the Visual.

Returns
Type Description
Visual

CreateVisual(int, bool)

Creates a Visual object that represents a drawing element.

Declaration
public Visual CreateVisual(int id, bool createRect = true)
Parameters
Type Name Description
int id

A custom space ID. It must be positive and unique within the View.

bool createRect

Indicates whether a new LayoutRect must be associated with the Visual.

Returns
Type Description
Visual

CreateVisual(Action<GcGraphics, Visual>)

Creates a Visual object that represents a drawing element.

Declaration
public Visual CreateVisual(Action<GcGraphics, Visual> draw)
Parameters
Type Name Description
Action<GcGraphics, Visual> draw

A delegate that accepts a GcGraphics object and a Visual, and draws the visual on the graphics.

Returns
Type Description
Visual

CreateVisual(Contour, bool)

Creates a Visual object that represents an element drawing the Contour.

Declaration
public Visual CreateVisual(Contour contour, bool createRect)
Parameters
Type Name Description
Contour contour

A Contour to be associated with the Visual.

bool createRect

Indicates whether a new LayoutRect must be associated with the Visual.

Returns
Type Description
Visual

CreateVisual(Contour, bool, Action<GcGraphics, Visual>)

Creates a Visual object that represents an element drawing the Contour.

Declaration
public Visual CreateVisual(Contour contour, bool createRect, Action<GcGraphics, Visual> draw)
Parameters
Type Name Description
Contour contour

A Contour to be associated with the Visual.

bool createRect

Indicates whether a new LayoutRect must be associated with the Visual.

Action<GcGraphics, Visual> draw

A delegate that accepts a GcGraphics object and a Visual, and draws the visual on the graphics.

Returns
Type Description
Visual

CreateVisual(AnchorPoint[])

Creates a Visual object that represents a polygon based on the given AnchorPoints.

Declaration
public Visual CreateVisual(AnchorPoint[] anchorPoints)
Parameters
Type Name Description
AnchorPoint[] anchorPoints

An array of AnchorPoints to draw.

Returns
Type Description
Visual

CreateVisual(AnchorPoint[], Action<GcGraphics, Visual>)

Creates a Visual object that represents a polygon based on the given AnchorPoints.

Declaration
public Visual CreateVisual(AnchorPoint[] anchorPoints, Action<GcGraphics, Visual> draw)
Parameters
Type Name Description
AnchorPoint[] anchorPoints

An array of AnchorPoints to draw.

Action<GcGraphics, Visual> draw

A delegate that accepts a GcGraphics object and a Visual, and draws the visual on the graphics.

Returns
Type Description
Visual