ImageGear .NET v25.2 - Updated
AddMark(ImGearARTMark,ImGearARTCoordinatesType) Method
Example 




ImageGear.Art Assembly > ImageGear.ART Namespace > ImGearARTPage Class > AddMark Method : AddMark(ImGearARTMark,ImGearARTCoordinatesType) Method
Reference to the mark to add.
Type of the coordinate system the mark coordinates are specified in.
Adds the specified mark into default annotation page group.
Syntax
'Declaration
 
Public Overloads Function AddMark( _
   ByVal mark As ImGearARTMark, _
   ByVal type As ImGearARTCoordinatesType _
) As Integer
'Usage
 
Dim instance As ImGearARTPage
Dim mark As ImGearARTMark
Dim type As ImGearARTCoordinatesType
Dim value As Integer
 
value = instance.AddMark(mark, type)
public int AddMark( 
   ImGearARTMark mark,
   ImGearARTCoordinatesType type
)
public: int AddMark( 
   ImGearARTMark* mark,
   ImGearARTCoordinatesType type
) 
public:
int AddMark( 
   ImGearARTMark^ mark,
   ImGearARTCoordinatesType type
) 

Parameters

mark
Reference to the mark to add.
type
Type of the coordinate system the mark coordinates are specified in.

Return Value

Integer value.
Remarks
You must specify the type of the mark's coordinate system. The mark will be drawn according to the type of its coordinate system.

Please make sure the mark does not have parent group (i.e. ImGearARTMark.ParentGroup is null), otherwise ImageGear.Core.ImGearException will be thrown. If the mark to be added already has parent group, please clone it prior to adding to the page.

Example
// Setup rectangle for new annotation.
ImGearRectangle igRectangle = new ImGearRectangle(0,0,200,20);
// Setup color for annotation.
ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(0, 255, 0);
// Create the annotation.
ImGearARTTypedText igARTTypedText = new ImGearARTTypedText(
    igRectangle, "Test Typed Text Annotation", igRGBQuad
);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTTypedText, ImGearARTCoordinatesType.IMAGE_COORD);
'Setup rectangle for new annotation.
Dim igRectangle As ImGearRectangle = New ImGearRectangle(0, 0, 200, 20)
'Setup color for annotation.
Dim igRGBQuad As ImGearRGBQuad = New ImGearRGBQuad(0, 255, 0)
'Create the annotation.
Dim igARTTypedText As ImGearARTTypedText = New ImGearARTTypedText( _
        igRectangle, "Test Typed Text Annotation", igRGBQuad _
        )
'Add the annotation to the ARTPage.
igARTPage.AddMark(igARTTypedText, ImGearARTCoordinatesType.IMAGE_COORD)
See Also

Reference

ImGearARTPage Class
ImGearARTPage Members
Overload List
ImGearARTMark Class
ImGearARTCoordinatesType Enumeration

Is this page helpful?
Yes No
Thanks for your feedback.