// 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);
' Setup start and endpoint for the ruler.
Dim igPointStart As New ImGearPoint(10, 10)
Dim igPointEnd As New ImGearPoint(igPage.DIB.Width / 2, igPage.DIB.Height / 2)
' Setup color for annotation.
Dim igRGBQuad As 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 with 50, 3 decimal places of precision,
' and a label in size 12 regular Arial font.
Dim igARTRuler As New ImGearARTRuler( _
igPointStart, igPointEnd, igRGBQuad, _
ImGearARTPenStyle.SOLID, 2, CInt(0.75 * 255), _
1, 1, 1, 1, 50, 50, 3, _
"ImGearARTRuler test", "Arial", CSng(12), ImGearARTFontStyles.Regular)
' Add the annotation to the ARTPage.
igARTPage.AddMark(igARTRuler, ImGearARTCoordinatesType.IMAGE_COORD)