ImageGear PDF v25.1 - Updated July 30, 2021
ImGearARTRuler Class
Members  Example 




ImageGear.Art Assembly > ImageGear.ART Namespace : ImGearARTRuler Class
Represents ART Ruler mark.
Object Model
ImGearARTRuler ClassImGearRectangle StructureIImGearRGBQuad InterfaceImGearPoint StructureImGearRectangle StructureImGearARTMeasurementUnit StructureImGearPoint Structure
Syntax
'Declaration
 
Public Class ImGearARTRuler 
   Inherits ImGearARTMark
   Implements IImGearARTRuler 
 
'Usage
 
Dim instance As ImGearARTRuler
Example
// 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);
Inheritance Hierarchy

System.Object
   ImageGear.ART.ImGearARTSelection
      ImageGear.ART.ImGearARTMark
         ImageGear.ART.ImGearARTRuler

See Also

Reference

ImGearARTRuler Members
ImageGear.ART Namespace