ImageGear for .NET
Creating a Mark via Function Calls
Send Feedback
ImageGear for .NET User Guide > Using ImageGear for .NET > Using ImageGear.ART Namespace > Creating, Saving, Loading, Modifying, and Deleting ART Marks > Creating a Mark via Function Calls

Glossary Item Box

Some applications won't use the ART ToolBar, or will provide the ToolBar and other options, to create marks. In that case, some functions in your application will need to create the marks directly. ART marks are created by using their constructors. For example, a rectangle mark can be created as follows: 

C# Copy Code
ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(255, 0, 0);
ImGearRectangle igRectangle = new ImGearRectangle(0, 0, 100, 100);
ImGearARTRectangle igARTRectangle = new ImGearARTRectangle(igRectangle, igRGBQuad);

Once it is created, it should be added to the ART page:

C# Copy Code
int markID;
markID = igARTPage.AddMark(igARTRectangle, ImGearARTCoordinatesType.IMAGE_COORD);

Mark properties can be edited at any time:

C# Copy Code
// Get the mark we just added.
igARTRectangle = (ImGearARTRectangle)igARTPage.MarkGet(markID);
igARTRectangle.Opacity = 128;
©2013. Accusoft Corporation. All Rights Reserved.