Visual Basic
C#
Managed Extensions for C++
C++/CLI
C# | Copy Code |
---|---|
// Setup location for the protractor ImGearPoint igPointStart = new ImGearPoint(igPage.DIB.Width / 2, igPage.DIB.Height / 2); ImGearPoint igPointHead = new ImGearPoint(50, 50); ImGearPoint igPointEnd = new ImGearPoint(igPage.DIB.Width / 2, 50); // Setup color for the protractor. ImGearRGBQuad igRGBQuad = new ImGearRGBQuad(0, 255, 0); // Create the protractor annotation with a width of 3 and 90% opacity, // 1:1 aspect ratio, radius of 100 for the arc drawn in the protractor, // 3 decimals of precision, and size 12 regular Times New Roman font. ImGearARTProtractor igARTProtractor = new ImGearARTProtractor( igPointStart, igPointHead, igPointEnd, igRGBQuad, ImGearARTPenStyle.SOLID, 3, (int)(0.90 * 255), 1, 1, 1, 1, 100, 3, "Times New Roman", (float)12.0, ImGearARTFontStyles.Regular ); // Add the annotation to the ARTPage. igARTPage.AddMark(igARTProtractor, ImGearARTCoordinatesType.IMAGE_COORD); |
Visual Basic | Copy Code |
---|---|
' Setup location for the protractor Dim igPointStart As New ImGearPoint(igPage.DIB.Width / 2, igPage.DIB.Height / 2) Dim igPointHead As New ImGearPoint(50, 50) Dim igPointEnd As New ImGearPoint(igPage.DIB.Width / 2, 50) ' Setup color for the protractor. Dim igRGBQuad As New ImGearRGBQuad(0, 255, 0) ' Create the protractor annotation with a width of 3 and 90% opacity, ' 1:1 aspect ratio, radius of 100 for the arc drawn in the protractor, ' 3 decimals of precision, and size 12 regular Times New Roman font. Dim igARTProtractor As New ImGearARTProtractor( _ igPointStart, igPointHead, igPointEnd, igRGBQuad, _ ImGearARTPenStyle.SOLID, 3, CInt(0.9 * 255), _ 1, 1, 1, 1, 100, _ 3, "Times New Roman", CSng(12), ImGearARTFontStyles.Regular) ' Add the annotation to the ARTPage. igARTPage.AddMark(igARTProtractor, ImGearARTCoordinatesType.IMAGE_COORD) |
System.Object
ImageGear.ART.ImGearARTSelection
ImageGear.ART.ImGearARTMark
ImageGear.ART.ImGearARTProtractor