GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AddConnectedLinesAnnotInteractive Method
A color object that defines the required color of the newly added connected lines annotation. It is the color of the drawn polyline and it corresponds to the AnnotationConnectedLines.StrokeColor property.
The width of the newly added connected lines annotation, in inches. It is the width of the drawn polyline and it corresponds to the AnnotationConnectedLines.BorderWidth property.
The opacity value of the newly added connected lines annotation, from 0 (full transparency) to 1 (full opacity).
Example





In This Topic
AddConnectedLinesAnnotInteractive Method (GdViewer)
In This Topic
Allows users to interactively add a new connected lines 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 connected lines annotation depicts a polyline consisting of several straight lines. This method uses the round cap style on both polyline ending points. Users end every individual line with a single click, and they finish the annotation with a double-click.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeConnectedLines. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationConnectedLines 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.

Allows users to interactively add a new connected lines (polyline) annotation using the mouse on the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
 
Public Sub AddConnectedLinesAnnotInteractive( _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal Opacity As Single _
) 
public void AddConnectedLinesAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float Opacity
)
public procedure AddConnectedLinesAnnotInteractive( 
    BorderColor: Color;
    BorderWidth: Single;
    Opacity: Single
); 
public function AddConnectedLinesAnnotInteractive( 
   BorderColor : Color,
   BorderWidth : float,
   Opacity : float
);
public: void AddConnectedLinesAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float Opacity
) 
public:
void AddConnectedLinesAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float Opacity
) 

Parameters

BorderColor
A color object that defines the required color of the newly added connected lines annotation. It is the color of the drawn polyline and it corresponds to the AnnotationConnectedLines.StrokeColor property.
BorderWidth
The width of the newly added connected lines annotation, in inches. It is the width of the drawn polyline and it corresponds to the AnnotationConnectedLines.BorderWidth property.
Opacity
The opacity value of the newly added connected lines annotation, from 0 (full transparency) to 1 (full opacity).
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.

Just to remind you that this method uses the round cap style on both polyline ending points.

Example
How to allow users to interactively add a conected lines annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddConnectedLines_Click(ByVal sender As Object, ByVal e As EventArgs)
    GdViewer1.AddConnectedLinesAnnotInteractive(Color.BlueViolet, 0.15F, 0.75F)
    If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddConnectedLinesAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddConnectedLines_Click(object sender, EventArgs e)
{
    GdViewer1.AddConnectedLinesAnnotInteractive(Color.BlueViolet, 0.15f, 0.75f);
    if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddConnectedLinesAnnotInteractive");
}
See Also