Error processing SSI file
(Leadtools.Annotations.Rendering)

Show in webframe

Render Method (AnnD2DObjectRenderer)







The mapper object to use for converting coordinates. Must not be null.
The object to render. Must not be null.
Renders an object.
Syntax
public abstract void Render( 
   AnnContainerMapper mapper,
   AnnObject annObject
)
'Declaration
 
Public MustOverride Sub Render( _
   ByVal mapper As AnnContainerMapper, _
   ByVal annObject As AnnObject _
) 
'Usage
 
Dim instance As AnnD2DObjectRenderer
Dim mapper As AnnContainerMapper
Dim annObject As AnnObject
 
instance.Render(mapper, annObject)
public abstract void Render( 
   AnnContainerMapper mapper,
   AnnObject annObject
)
 function Leadtools.Annotations.Rendering.AnnD2DObjectRenderer.Render( 
   mapper ,
   annObject 
)

Parameters

mapper
The mapper object to use for converting coordinates. Must not be null.
annObject
The object to render. Must not be null.
Remarks

This method is called by the framework to render an object. The AnnD2DObjectRenderer class is a base class and does not have any information on how to render an annObject. Thus the Render method is an abstract method. Derived classes such as the AnnRectangleObjectRenderer class or the AnnD2DPolylineObjectRenderer class implements the Render method to do the actual rendering of the object.

For example, the AnnRectangleObjectRenderer class will implements this method as follows:

  1. Casts an annObject to AnnD2DRectangleObjectRenderer, (and will fail if the object is not of the correct type).

  2. Gets the points of the object stored in the annObject.Points property of the annObject. Since this is a rectangle object, an array of 4 points is retrieved.

  3. These points are in container coordinates, therefore, mapper.PointsFromContainerCoordinates is called to convert these points to physical coordinates.

  4. The AnnRenderingEngine.Context property contains the destination context to render to. The renderer creates a closed path on this context for the rectangle shape. Note that the rectangle object might be rotated and hence the points returned in step 2 above are the 4 edges of the rectangle in its current transformation (top left, top right, right bottom and left bottom). This is why the renderer draws a path instead of a rectangle.

  5. Finally, the path is optionally stroked using the AnnObject.Stroke method and filled using the AnnObject.Fill method.

Requirements

Target Platforms

See Also

Reference

AnnD2DObjectRenderer Class
AnnD2DObjectRenderer Members

Error processing SSI file
Leadtools.Annotations.Rendering requires a Document or Medical toolkit license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features