[]
        
(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)
Public Function CreateVisual(Optional createRect As Boolean = True) As Visual
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)
Public Function CreateVisual(id As Integer, Optional createRect As Boolean = True) As Visual
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)
Public Function CreateVisual(draw As Action(Of GcGraphics, Visual)) As Visual
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)
Public Function CreateVisual(contour As Contour, createRect As Boolean) As Visual
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)
Public Function CreateVisual(contour As Contour, createRect As Boolean, draw As Action(Of GcGraphics, Visual)) As Visual
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)
Public Function CreateVisual(anchorPoints As AnchorPoint()) As Visual
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)
Public Function CreateVisual(anchorPoints As AnchorPoint(), draw As Action(Of GcGraphics, Visual)) As Visual
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