// Setup color for the border.
ImGearRGBQuad igRGBQuadBorder = new ImGearRGBQuad(0, 255, 0);
// Setup a border with a width of 3 and a dot pattern.
ImGearARTBorder igARTBorder = new ImGearARTBorder(
igRGBQuadBorder, 3, ImGearARTPenStyle.DOT
);
// Setup color for the pin.
ImGearRGBQuad igRGBQuadPin = new ImGearRGBQuad(0, 0, 255);
// Create pin to be used in the annotation.
ImGearARTPin igARTPin = new ImGearARTPin(igRGBQuadPin, ImGearARTPinAlignment.RIGHT_TOP);
// Setup color for the callout border.
ImGearRGBQuad igRGBQuadBorderCallout = new ImGearRGBQuad(0, 255, 255);
// Setup a border with a width of 3 and a solid pattern.
ImGearARTBorder igARTBorderCallout = new ImGearARTBorder(
igRGBQuadBorder, 3, ImGearARTPenStyle.SOLID
);
// Create a callout to be used for the text annotation.
ImGearARTCallout igARTCallout = new ImGearARTCallout(
ImGearARTCalloutType.LINE, igPage.DIB.Width / 2,
igPage.DIB.Height / 2, igARTBorderCallout
);
// Setup rectangle for the text mark's location.
ImGearRectangle igRectangle = new ImGearRectangle(10, 10, 330, 40);
// Setup color for the text.
ImGearRGBQuad igRGBQuadText = new ImGearRGBQuad(255, 0, 255);
// Setup color for the fill.
ImGearRGBQuad igRGBQuadFill = new ImGearRGBQuad(200, 200, 200);
// Create the text annotation.
ImGearARTText igARTText = new ImGearARTText(
igRectangle, "ImGearARTText annotation", igRGBQuadText,
ImGearARTTextType.DIRECT_TEXT, 255, igRGBQuadFill, igARTBorder, false,
255, "Arial", (float)14.0, ImGearARTFontStyles.Regular, igARTPin, igARTCallout
);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTText, ImGearARTCoordinatesType.IMAGE_COORD);