GdPicture.NET Reference Guide
AddFreeHandPolygonAnnotInteractive Method (GdViewer)





GdPicture14.WPF Namespace > GdViewer Class : AddFreeHandPolygonAnnotInteractive Method
A color object that defines the required border color of the newly added freehand polygon annotation.
The border width of the newly added freehand polygon annotation, in inches.
A color object that defines the required background color of the newly added freehand polygon annotation.
The opacity value of the newly added freehand polygon annotation, from 0 (full transparency) to 1 (full opacity).
Allows users to interactively add a new freehand polygon annotation using the mouse on the current page of the document displayed in the GdViewer control. The annotation object is added following all the parameters you have specified and respecting the dimensions users will define using the mouse as well.

A freehand polygon is an arbitrary closed shape which users paint by moving the mouse. Drawing a polygon starts with pressing the mouse button and it finishes with releasing the mouse button.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeFreeHandPolygon. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationFreehandPolygon class before or after the successful creation of the annotation object. Please refer to both the BeforeAnnotationAddedByUser and the AnnotationAddedByUser events, respectively to both the PreviewBeforeAnnotationAddedByUser and the PreviewAnnotationAddedByUser events, for how to achieve this.

Be aware that the editing mode for annotations must be enabled using the SetAnnotationEditorMode method, otherwise this method will fail.

Syntax
'Declaration
 
Public Sub AddFreeHandPolygonAnnotInteractive( _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal BackColor As Color, _
   ByVal Opacity As Single _
) 
public void AddFreeHandPolygonAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   Color BackColor,
   float Opacity
)
public procedure AddFreeHandPolygonAnnotInteractive( 
    BorderColor: Color;
    BorderWidth: Single;
    BackColor: Color;
    Opacity: Single
); 
public function AddFreeHandPolygonAnnotInteractive( 
   BorderColor : Color,
   BorderWidth : float,
   BackColor : Color,
   Opacity : float
);
public: void AddFreeHandPolygonAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   Color BackColor,
   float Opacity
) 
public:
void AddFreeHandPolygonAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   Color BackColor,
   float Opacity
) 

Parameters

BorderColor
A color object that defines the required border color of the newly added freehand polygon annotation.
BorderWidth
The border width of the newly added freehand polygon annotation, in inches.
BackColor
A color object that defines the required background color of the newly added freehand polygon annotation.
Opacity
The opacity value of the newly added freehand polygon annotation, from 0 (full transparency) to 1 (full opacity).
Remarks
Please always use the GetStat method to determine if this method has been successful. If the editing mode for annotations is disabled, the method will fail.

Be aware that this method expects to have the GdPicture XMP/Annotations Plugin to be unlocked.

See Also

Reference

GdViewer Class
GdViewer Members
BeforeAnnotationAddedByUser Event
AnnotationAddedByUser Event
SetAnnotationEditorMode Method
GetAnnotationCount Method
PreviewBeforeAnnotationAddedByUser Event
PreviewAnnotationAddedByUser Event