// Setup start and endpoint for the ruler.
ImGearPoint igPointStart = new ImGearPoint(10, 10);
ImGearPoint igPointEnd = new ImGearPoint(igPage.DIB.Width / 2, igPage.DIB.Height / 2);
// 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.
ImGearARTRuler igARTRuler = new ImGearARTRuler(
igPointStart, igPointEnd, igRGBQuad,
ImGearARTPenStyle.SOLID, 2, (int)(0.75 * 255),
1, 1, 1, 1, 50, 50, 3,
"ImGearARTRuler test", "Arial", (float)12.0, ImGearARTFontStyles.Regular
);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTRuler, ImGearARTCoordinatesType.IMAGE_COORD);