ImageGear22.Art Assembly > ImageGear.ART Namespace > ImGearARTPage Class > AddMark Method : AddMark(ImGearARTMark,ImGearARTCoordinatesType) Method |
'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 )
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.
// 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)