Polygon Object Attributes

 

Additional to the Common Attributes, this object has the following attributes:

Attribute Name

Description

Type

Values

Default Value

Left

Left position in Twips

Integer

 

0

Top

Top position in Twips

Integer

 

0

Right

Right position in Twips

Integer

 

0

Bottom

Bottom position in Twips

Integer

 

0

LeftF

Left position in Twips

Float

 

0.00F

TopF

Top position in Twips

Float

 

0.00F

RightF

Right position in Twips

Float

 

0.00F

BottomF

Bottom position in Twips

Float

 

0.00F

Page

Page Index where object is located.  Page Number is Page Index + 1.

Integer

>= 0

0

Points

Number of vertices

Integer

>=3

 

StrokeColor

Color used to draw line.

Color

COLORREF (bbggrr) 000000 to FFFFFF

or in COLORREF (aabbggrr) 00000000 to FFFFFFFF

000000 (Solid black)

StrokeWidth

Width of line in points (12th of an inch).

enum acStrokeWidth

1: acStrokeWidthSimple

2: acStrokeWidthDouble

3: acStrokeWidthTriple

4: acStrokeWidthQuadruple

1: acStrokeWidthSimple

StrokeStyle

Drawing style

enum acStrokeStyle

0: acStrokeStyleContinuous

1: acStrokeStyleDashed

2: acStrokeStyleDotted

0:acStrokeStyleContinuous

BackColor

*Takes effect only when FillStyle is not 0

Color for filling the background of Text object.

Color

COLORREF (bbggrr) 000000 to FFFFFF

or in COLORREF (aabbggrr) 00000000 to FFFFFFFF

FFFFFF (Solid white)

FillStyle

Fill style for the frame

enum acFillStyle

0: acFillStyleNone

1: acFillStyleSolid fill

2: acFillStyleHatched

3: acFillStyleCustom

0: acFillStyleNone

HatchStyle

Effective when FillStyle is acFillStyleHatched

enum acHatchStyle

0: acHatchStyleNone

1: acHatchStyleHorizontal

2: acHatchStyleVertical

3: acHatchStyleLeftRight

4: acHatchStyleRightLeft

5: acHatchStyleSquares

6: acHatchStyleDiagonal

0: acHatchStyleNone

Text

String of text contained in object.

String

 

NULL

TextColor

Color for drawing text.

Color

COLORREF (bbggrr) 000000 to FFFFFF

or in COLORREF (aabbggrr) 00000000 to FFFFFFFF

000000 (Solid Black)

TextFont

Font name and style for drawing text.

Font

String in the form of: FontName,FontSize, Weight, Italic, Underline

NULL

HorzAlign

Horizontal text alignment.

enum acHorzAlign

1: acHorzAlignLeft

2: acHorzAlignCenter

3: acHorzAlignRight

4: acHorzJustify

2: acHorzAlignCenter

VertAlign

Vertical text alignment.

enum acVertAlign

1: acVertAlignTop

2: acVertAlignCenter

3: acVertAlignBottom

2: acVertAlignCenter

TextAngle

Angle for drawing text

Integer

10th of a degree

0

TextGap

Gap between text and borders.

enum acTextGap. Units are in points or 12th of an inch.

0: acTextGapNone

1: acTextGapThin

2: acTextGapMedium

3: acTextGapThick

0: acTextGapNone

Xpoints

Horizontal coordinates.

Array

 

0

Ypoints

Vertical coordinates.

Array

 

0

Rotation

Polygon rotation.

Integer

10th of a degree

0

Locked

Object cannot be modified

Boolean

True / False

False

CharSpacing

Spacing between characters.

Integer

10th of a Twip

0

WordSpacing

Spacing between words.

Integer

10th of a Twip

0

FillMode

Polygon filling mode.

enum acFillMode

1: acFillModeAlternate

2: acFillModeWinding

1: acFillModeAlternate

Operations

Operations that define how the points are connected.

Array of enum PolyOps

0: acNoOp

1: acCloseFigure

2: acLineTo

4: acBezierTo

6: acMoveto

16: acClip_Windin

32: acClip_Alternate

0: acNoOp

Styles

The first value specifies the length of the first dash in a user-defined style; the second value specifies the length of the first space, and so on.

Integer Array

 

0

StylesF

Same Styles, but it use Float values more accurate.

Float Array

 

0

CanHaveText

User can enter text.

Boolean

True/False

True

FormattedText

It is the string contents of the cell that includes formatting information such as Bold or Italic.

String

 

NULL

The Formatted Text property allows the user to specify the text that has some sections formatted with a given format style such as: font size, color, bold, italics, underlined, strike-through, etc.

The notations mentioned below are used to specify the needed formats:

Notations

Meaning

b

Bold

i

Italics

u

Underline

s

Strike-through

fs

Font size multiplied by 100.

fc

Font Color, and the color number is hexadecimal.

 

The text section should be enclosed with tags to specify the formatting. For example: <b>Hello World</b> will make the text "Hello World" to be bold.

If a style has an attribute like in the case of font size and font color, we add a colon to the opening tag and append the attribute after it, for example: <fs:1200>Hello World</fs> will set the text "Hello World" to a font size of 12.

Example

<fc:FF0000><fs:2400><u>Hello</u><i>W<s>or</s>l</i>d</fs></fc>

displays as:

Hidden

Hidden in certain report states

Integer

A binary combination of the following values:

1: Hidden in Run mode

2: Hidden in Design mode

4: Reserved value

8: Hidden in Print preview

16: Hidden in Annotation mode

0: Always visible

PolygonType

*ReadOnly

Describes the way the polygon was created.

Integer

0: Lines Polygon

1: Freehand drawing

0: Lines Polygon

Annotation

Object is saved as an annotation as opposed to a drawing within the page contents

Boolean

True / False

False for static objects such as lines, polygons and text. True for dynamic objects such as form fields or high-lighters

LineCap

Shape of the end point of a line.

enum acLineCap

0: acLineCapFlat

1: acLineCapRound

2: acLineCapSquare

0:acLineCapFlat

LineJoin

Shape of the connection when two lines meet.

enum acLineJoin

0: acLineJoinMiter

1: acLineJoinRound

2: acLineJoinBevel

0:acLineJoinMiter

MiterLimit

*applies only when LineJoin is acLineJoinMiter

The maximum length of mitered line joins.

Float

 

0

CanActivate

User can Activate.

Boolean

True/False

True

ClipPoints

Points that define the clip region.

Array of Points

 

NULL

ClipOps

Operations that define how the points are connected.

Array of enum PolyOps

0: acNoOp       

1: acCloseFigure      

2: acLineTo           

4: acBezierTo         

6: acMoveto           

16: acClip_Winding

32: acClip_Alternate

0: acNoOp

LayerID

ID layer which belongs the object.

String

   

Opacity

Object' s image will be rendered in the case of using GDI+ or DirectX with varying range of translucency

Integer

1 (most translucent) to 100 (most opaque)

100

Visible

Object is visible when document is printed

Boolean

True / False

True

XpointsF

Same Xpoints, but it use Float values more accurate.

Array

 

0

YpointsF

Same Ypoints, but it use Float values more accurate.

Array

 

0

XAML

XAML representation of the object

String

   

BlendMode  

Blends the color object according to a define mode. This blending is also applied to the object when it is saved or printed.

enum acBlendMode

0: acBlendModeNormal

1: acBlendModeMultiply

2: acBlendModeScreen

3: acBlendModeOverlay

4 : acBlendModeDarken

5: acBlendModeLighten

6: acBlendModeColorDodge

7: acBlendModeColorBurn

8: acBlendModeHardLight

9: acBlendModeSoftLight

10: acBlendModeDifference

11: acBlendModeExclusion

12 : acBlendModeHue

13: acBlendModeSaturation

14 : acBlendModeColor

15: acBlendModeLuminosity

16: acBlendModeCompatible

0: acBlendModeNormal

 

 

Example

Font color blue, font size 24, "Hello" underlined, "W" and "l" italics, and "or" strikeout):

<fc:FF0000><fs:2400><u>Hello</u> <i>W<s>or</s>l</i>d</fs></fc>

Displays as:

 

Example

Sub Sample()
    ' Constants for Activation codes
    Const strLicenseTo As String = "Amyuni PDF Creator Evaluation"
    Const strActivationCode As String = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC"
 
    ' Initializing PDFCreativeX Object
    Dim pdf As ACPDFCREACTIVEX.PDFCreactiveX = New ACPDFCREACTIVEX.PDFCreactiveX()
 
    ' Set license key
    pdf.SetLicenseKey(strLicenseTo, strActivationCode)
 
    ' Set CurrentPage
    pdf.CurrentPage = 1
 
    ' Create a Polygon in the current Page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePolygon, "Hexagon1")
    ' Define Object
    Dim oPolygon As ACPDFCREACTIVEX.IacObject = pdf.GetObjectByName("Hexagon1")
    ' General Attributes
    oPolygon("Points") = 6
    oPolygon("Left") = 1000
    oPolygon("Right") = 5000
    oPolygon("Top") = 1000
    oPolygon("Bottom") = 5000
    ' FreeHand Attributes
    oPolygon("StrokeColor") = &HFFFF00
    oPolygon("StrokeWidth") = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple
    oPolygon("Text") = "Amyuni Technologies"
    oPolygon("HorzAlign") = ACPDFCREACTIVEX.acHorzAlign.acHorzAlignCenter
    oPolygon("VertAlign") = ACPDFCREACTIVEX.acVertAlign.acVertAlignCenter
    oPolygon("TextGap") = ACPDFCREACTIVEX.acTextGap.acTextGapThin
 
    ' Create a Polygon in the current Page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePolygon, "Rectangle1")
    ' Define Object
    oPolygon = pdf.GetObjectByName("Rectangle1")
    ' General Attributes
    oPolygon("Points") = 4
    oPolygon("Left") = 1000
    oPolygon("Right") = 5500
    oPolygon("Top") = 1000
    oPolygon("Bottom") = 5000
    ' FreeHand Attributes
    oPolygon("StrokeColor") = &HFF00
    oPolygon("StrokeWidth") = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple
    oPolygon("Text") = "Hello World!"
    oPolygon("XPoints") = New Integer() {0, 0, 4000, 4000, 0}
    oPolygon("YPoints") = New Integer() {0, 4000, 4000, 0, 0}
    oPolygon("Operations") = New Integer() {ACPDFCREACTIVEX.PolyOps.acMoveto,
           ACPDFCREACTIVEX.PolyOps.acLineTo,
           ACPDFCREACTIVEX.PolyOps.acLineTo,
           ACPDFCREACTIVEX.PolyOps.acLineTo,
           ACPDFCREACTIVEX.PolyOps.acLineTo,
           ACPDFCREACTIVEX.PolyOps.acLineTo}
 
    ' Save PDF
    pdf.Save("c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView)
 
End Sub
static void Sample()
{
    // Constants for Activation codes
    const string strLicenseTo = "Amyuni PDF Creator Evaluation";
    const string strActivationCode = "07EFCDAB010001004282943F2AF19A88F332D9E781E40460727DF8A42847A1BDE06DB61C71E94E2D90424BF8762385335F9D6884E9FC";
 
    // Initializing PDFCreativeX Object
    ACPDFCREACTIVEX.PDFCreactiveX pdf = new ACPDFCREACTIVEX.PDFCreactiveX();
 
    // Set license key
    pdf.SetLicenseKey(strLicenseTo, strActivationCode);
 
    // Set CurrentPage
    pdf.CurrentPage = 1;
 
    // Create a Polygon in the current Page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePolygon, "Hexagon1");
    // Define Object
    ACPDFCREACTIVEX.IacObject oPolygon = pdf.GetObjectByName("Hexagon1");
    // ' eneral Attributes
    oPolygon["Points"] = 6;
    oPolygon["Left"] = 1000;
    oPolygon["Right"] = 5000;
    oPolygon["Top"] = 1000;
    oPolygon["Bottom"] = 5000;
    // FreeHand Attributes
    oPolygon["StrokeColor"] = 0xFFFF00;
    oPolygon["StrokeWidth"] = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple;
    oPolygon["Text"] = "Amyuni Technologies";
    oPolygon["HorzAlign"] = ACPDFCREACTIVEX.acHorzAlign.acHorzAlignCenter;
    oPolygon["VertAlign"] = ACPDFCREACTIVEX.acVertAlign.acVertAlignCenter;
    oPolygon["TextGap"] = ACPDFCREACTIVEX.acTextGap.acTextGapThin;
 
    // Create a Polygon in the current Page
    pdf.CreateObject(ACPDFCREACTIVEX.ObjectTypeConstants.acObjectTypePolygon, "Rectangle1");
    // Define Object
    oPolygon = pdf.GetObjectByName("Rectangle1");
    // ' eneral Attributes
    oPolygon["Points"] = 4;
    oPolygon["Left"] = 1000;
    oPolygon["Right"] = 5500;
    oPolygon["Top"] = 1000;
    oPolygon["Bottom"] = 5000;
    // FreeHand Attributes
    oPolygon["StrokeColor"] = 0xFF0000;
    oPolygon["StrokeWidth"] = ACPDFCREACTIVEX.acStrokeWidth.acStrokeWidthTriple;
    oPolygon["Text"] = "Hello World!";
    oPolygon["XPoints"] = new int[] { 0, 0, 4000, 4000, 0 };
    oPolygon["YPoints"] = new int[] { 0, 4000, 4000, 0, 0 };
    oPolygon["Operations"] = new int[] {
        (int)ACPDFCREACTIVEX.PolyOps.acMoveto,
        (int)ACPDFCREACTIVEX.PolyOps.acLineTo,
        (int)ACPDFCREACTIVEX.PolyOps.acLineTo,
        (int)ACPDFCREACTIVEX.PolyOps.acLineTo,
        (int)ACPDFCREACTIVEX.PolyOps.acLineTo,
        (int)ACPDFCREACTIVEX.PolyOps.acLineTo};
 
    // Save PDF
    pdf.Save(@"c:\temp\CreatePDFDocument_resulting.pdf", ACPDFCREACTIVEX.FileSaveOptionConstants.acFileSaveView);
 
}