ImageGear .NET v25.1 - Updated
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
public class ImGearARTRuler : ImGearARTMark, IImGearARTRuler  
public __gc class ImGearARTRuler : public ImGearARTMark, IImGearARTRuler  
public ref class ImGearARTRuler : public ImGearARTMark, IImGearARTRuler  
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);
' 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)
Inheritance Hierarchy

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

See Also

Reference

ImGearARTRuler Members
ImageGear.ART Namespace