Renders an object.
public abstract void Render(
Leadtools.Annotations.Core.AnnContainerMapper mapper,
Leadtools.Annotations.Core.AnnObject annObject
)
Public MustOverride Sub Render( _
ByVal mapper As Leadtools.Annotations.Core.AnnContainerMapper, _
ByVal annObject As Leadtools.Annotations.Core.AnnObject _
)
public abstract void Render(
Leadtools.Annotations.Core.AnnContainerMapper mapper,
Leadtools.Annotations.Core.AnnObject annObject
)
function Leadtools.Annotations.Rendering.AnnObjectRenderer.Render(
mapper ,
annObject
)
mapper
The mapper object to use for converting coordinates. Must not be null.
annObject
The object to render. Must not be null.
This method is called by the framework to render an object. The AnnObjectRenderer 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 AnnPolylineObjectRenderer class implements the Render method to do the actual rendering of the object.
For example, the AnnRectangleObjectRenderer class will implements this method as follows:
Casts an annObject to AnnRectangleObject, (and will fail if the object is not of the correct type).
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.
These points are in container coordinates, therefore, mapper.PointsFromContainerCoordinates is called to convert these points to physical coordinates.
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.
Finally, the path is optionally stroked using the AnnObject.Stroke method and filled using the AnnObject.Fill method.
Products |
Support |
Feedback: Render Method (AnnObjectRenderer) - Leadtools.Annotations.Rendering |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.