// Setup points for the ruler.
ImGearPoint[] igPoints = new ImGearPoint[4];
igPoints[0] = new ImGearPoint(10, 10);
igPoints[1] = new ImGearPoint(10, 20);
igPoints[2] = new ImGearPoint(20, 15);
igPoints[3] = new ImGearPoint(30, 10);
// Setup color for annotation.
ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(0, 255, 0);
// Create the ruler annotation with a solid line of width 2 and 75% opacity,
// 1:1 aspect ratio, end lines of width 50, 3 decimal places of precision,
// and a label in size 12 regular Arial font.
ImGearARTPolyRuler igARTPolyRuler = new ImGearARTPolyRuler(
igPoints, igRGBQuad,
ImGearARTPenStyle.SOLID, 2, (int)(0.75 * 255),
1, 1, 1, 1, 50, 50, 3,
"ImGearARTPolyRuler test", "Arial", (float)12.0, ImGearARTFontStyles.Regular);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTPolyRuler, ImGearARTCoordinatesType.IMAGE_COORD);