ImageGear PDF v25.2 - Updated
ImGearARTPolyRuler Class
Members  Example 




ImageGear.Art Assembly > ImageGear.ART Namespace : ImGearARTPolyRuler Class
Represents ART Polyline Ruler mark.
Object Model
ImGearARTPolyRuler ClassImGearRectangle StructureIImGearRGBQuad InterfaceImGearPoint StructureImGearRectangle StructureImGearARTMeasurementUnit Structure
Syntax
'Declaration
 
Public Class ImGearARTPolyRuler 
   Inherits ImGearARTMark
   Implements IImGearARTPolyRuler 
'Usage
 
Dim instance As ImGearARTPolyRuler
public class ImGearARTPolyRuler : ImGearARTMark, IImGearARTPolyRuler  
public __gc class ImGearARTPolyRuler : public ImGearARTMark, IImGearARTPolyRuler  
public ref class ImGearARTPolyRuler : public ImGearARTMark, IImGearARTPolyRuler  
Example
// 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);
' Setup points for the ruler.
Dim igPoints As ImGearPoint() = New ImGearPoint(3) {}
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.
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 width 50, 3 decimal places of precision,
'  and a label in size 12 regular Arial font.
Dim igARTPolyRuler As New ImGearARTPolyRuler(igPoints, igRGBQuad, ImGearARTPenStyle.SOLID, 2, CInt(Math.Truncate(0.75 * 255)), 1, _
 1, 1, 1, 50, 50, 3, _
 "ImGearARTPolyRuler test", "Arial", CSng(12.0), ImGearARTFontStyles.Regular)

' Add the annotation to the ARTPage.
igARTPage.AddMark(igARTPolyRuler, ImGearARTCoordinatesType.IMAGE_COORD)
Inheritance Hierarchy

System.Object
   ImageGear.ART.ImGearARTSelection
      ImageGear.ART.ImGearARTMark
         ImageGear.ART.ImGearARTPolyRuler

See Also

Reference

ImGearARTPolyRuler Members
ImageGear.ART Namespace

Is this page helpful?
Yes No
Thanks for your feedback.