ImageGear .NET v25.1 - Updated
ImGearARTPolygon Class
Members  Example 




ImageGear.Art Assembly > ImageGear.ART Namespace : ImGearARTPolygon Class
Represents ART Polygon mark.
Object Model
ImGearARTPolygon ClassImGearARTBorder ClassImGearRectangle StructureIImGearRGBQuad InterfaceImGearPoint StructureImGearRectangle Structure
Syntax
'Declaration
 
Public Class ImGearARTPolygon 
   Inherits ImGearARTMark
   Implements IImGearARTPolygon 
'Usage
 
Dim instance As ImGearARTPolygon
public class ImGearARTPolygon : ImGearARTMark, IImGearARTPolygon  
public __gc class ImGearARTPolygon : public ImGearARTMark, IImGearARTPolygon  
public ref class ImGearARTPolygon : public ImGearARTMark, IImGearARTPolygon  
Example
// Create an array of 5 points for the polygon.
ImGearPoint[] igPoints = new ImGearPoint[5];
igPoints[0] = new ImGearPoint(20, 20);
igPoints[1] = new ImGearPoint(200, 40);
igPoints[2] = new ImGearPoint(200, 60);
igPoints[3] = new ImGearPoint(120, 120);
igPoints[4] = new ImGearPoint(20, 40);
// Setup color for the polygon fill.
ImGearRGBQuad igRGBQuadFill = new ImGearRGBQuad(40, 200, 40);
// Setup color for the polygon border.
ImGearRGBQuad igRGBQuadBorder = new ImGearRGBQuad(0, 0, 0);
// Create polygon with a solid border of width 10, and 33% opacity
ImGearARTPolygon igARTPolygon = new ImGearARTPolygon(
    igPoints, igRGBQuadFill, igRGBQuadBorder,
    ImGearARTPenStyle.SOLID, 10, (int)(0.33 * 255)
);
// Add the annotation to the ARTPage.
igARTPage.AddMark(igARTPolygon, ImGearARTCoordinatesType.IMAGE_COORD);
' Create an array of 5 points for the polygon.
Dim igPoints As ImGearPoint() = New ImGearPoint(4) {}
igPoints(0) = New ImGearPoint(20, 20)
igPoints(1) = New ImGearPoint(200, 40)
igPoints(2) = New ImGearPoint(200, 60)
igPoints(3) = New ImGearPoint(120, 120)
igPoints(4) = New ImGearPoint(20, 40)
' Setup color for the polygon fill.
Dim igRGBQuadFill As New ImGearRGBQuad(40, 200, 40)
' Setup color for the polygon border.
Dim igRGBQuadBorder As New ImGearRGBQuad(0, 0, 0)
' Create polygon with a solid border of width 10, and 33% opacity
Dim igARTPolygon As New ImGearARTPolygon( _
 igPoints, igRGBQuadFill, igRGBQuadBorder, _
 ImGearARTPenStyle.SOLID, 10, CInt((0.33 * 255)))
' Add the annotation to the ARTPage.
igARTPage.AddMark(igARTPolygon, ImGearARTCoordinatesType.IMAGE_COORD)
Inheritance Hierarchy

System.Object
   ImageGear.ART.ImGearARTSelection
      ImageGear.ART.ImGearARTMark
         ImageGear.ART.ImGearARTPolygon

See Also

Reference

ImGearARTPolygon Members
ImageGear.ART Namespace
ImGearARTMark Class