GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AddFreeHandHighlighterAnnotInteractive Method / AddFreeHandHighlighterAnnotInteractive(Color,Single,Boolean) Method
A color object that defines the required color of the newly added freehand highlighter annotation. It corresponds to the AnnotationFreeHandHighlighter.StrokeColor property.
The width of the newly added freehand highlighter anotation, in inches. It corresponds to the AnnotationFreeHandHighlighter.BorderWidth property.
Set this parameter to true to enable the creation of multiple separated highlighter lines during one drawing operation. In this mode users finish the whole freehand highlighter annotation with a first double-click.

Set it to false to only enable the creation of one continual freehand highlighter line.

Example





In This Topic
AddFreeHandHighlighterAnnotInteractive(Color,Single,Boolean) Method
In This Topic
Allows users to interactively add a new freehand highlighter 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 highlighter annotation is an arbitrary line, which users draw moving the mouse to highlight the required area on the page. This method enables users to draw multiple separated freehand highlighter lines within one freehand highlighter annotation.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeFreeHandHighlighter. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationFreeHandHighlighter class before or after the successful creation of the annotation object. Please refer to both the BeforeAnnotationAddedByUser and the AnnotationAddedByUser 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 Overloads Sub AddFreeHandHighlighterAnnotInteractive( _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal ContinuousMode As Boolean _
) 
public void AddFreeHandHighlighterAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   bool ContinuousMode
)
public procedure AddFreeHandHighlighterAnnotInteractive( 
    BorderColor: Color;
    BorderWidth: Single;
    ContinuousMode: Boolean
); 
public function AddFreeHandHighlighterAnnotInteractive( 
   BorderColor : Color,
   BorderWidth : float,
   ContinuousMode : boolean
);
public: void AddFreeHandHighlighterAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   bool ContinuousMode
) 
public:
void AddFreeHandHighlighterAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   bool ContinuousMode
) 

Parameters

BorderColor
A color object that defines the required color of the newly added freehand highlighter annotation. It corresponds to the AnnotationFreeHandHighlighter.StrokeColor property.
BorderWidth
The width of the newly added freehand highlighter anotation, in inches. It corresponds to the AnnotationFreeHandHighlighter.BorderWidth property.
ContinuousMode
Set this parameter to true to enable the creation of multiple separated highlighter lines during one drawing operation. In this mode users finish the whole freehand highlighter annotation with a first double-click.

Set it to false to only enable the creation of one continual freehand highlighter line.

Remarks
The GetStat method can be subsequently used to determine if this method has been successful. If the editing mode for annotations is disabled, the method will fail.
Example
How to allow users to interactively add a freehand highlighter annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddFreeHandHighlighter_Click(ByVal sender As Object, ByVal e As EventArgs)
    GdViewer1.AddFreeHandHighlighterAnnotInteractive(Color.Red, 0.2F, True)
    If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddFreeHandHighlighterAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddFreeHandHighlighter_Click(object sender, EventArgs e)
{
    GdViewer1.AddFreeHandHighlighterAnnotInteractive(Color.Red, 0.2f, true);
    if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddFreeHandHighlighterAnnotInteractive");
}
See Also