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# | ![]() |
---|---|
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# | ![]() |
---|---|
int markID;
markID = igARTPage.AddMark(igARTRectangle, ImGearARTCoordinatesType.IMAGE_COORD); |
Mark properties can be edited at any time:
C# | ![]() |
---|---|
// Get the mark we just added.
igARTRectangle = (ImGearARTRectangle)igARTPage.MarkGet(markID);
igARTRectangle.Opacity = 128; |