ImageGear for .NET
AddMark(ImGearARTMark,ImGearARTCoordinatesType) Method
See Also  Example Send Feedback
ImageGear21.Art Assembly > ImageGear.ART Namespace > ImGearARTPage Class > AddMark Method : AddMark(ImGearARTMark,ImGearARTCoordinatesType) Method




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

Glossary Item Box

Adds the specified mark into default annotation page group.

Syntax

 
Visual Basic
C#
Managed Extensions for C++
C++/CLI
 
 

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

C#Copy Code
// 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);
Visual BasicCopy Code
'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

©2013. Accusoft Corporation. All Rights Reserved.