GdPicture.NET.14
GdPicture14 Namespace / GdViewer Class / AddLineArrowAnnotInteractive Method / AddLineArrowAnnotInteractive(Color,Single,Single,Single,Boolean,Single) Method
A color object that defines the required color of the newly added line arrow annotation. It corresponds to the AnnotationLineArrow.StrokeColor property.
The width of the newly added line arrow annotation, in inches. It is the width of the line and it corresponds to the AnnotationLineArrow.BorderWidth property.
The width of the arrow, in inches. This value only defines the width of the very arrow on the end of the line.
The height of the arrow, in inches. This value only defines the height of the very arrow on the end of the line.
Set this parameter to true to depict a sharp arrowhead. Set it to false to paint a rounded arrowhead.
The opacity value of the newly added line arrow annotation, from 0 (full transparency) to 1 (full opacity).
Example





In This Topic
AddLineArrowAnnotInteractive(Color,Single,Single,Single,Boolean,Single) Method
In This Topic
Allows users to interactively add a new line arrow 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.

This annotation depicts a straight line with an arrow on its ending point. The arrowhead is always painted on the end of the drawn line using this method.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeLineArrow. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationLineArrow 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 AddLineArrowAnnotInteractive( _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal ArrowWidth As Single, _
   ByVal ArrowHeight As Single, _
   ByVal ArrowFilled As Boolean, _
   ByVal Opacity As Single _
) 
public void AddLineArrowAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float ArrowWidth,
   float ArrowHeight,
   bool ArrowFilled,
   float Opacity
)
public procedure AddLineArrowAnnotInteractive( 
    BorderColor: Color;
    BorderWidth: Single;
    ArrowWidth: Single;
    ArrowHeight: Single;
    ArrowFilled: Boolean;
    Opacity: Single
); 
public function AddLineArrowAnnotInteractive( 
   BorderColor : Color,
   BorderWidth : float,
   ArrowWidth : float,
   ArrowHeight : float,
   ArrowFilled : boolean,
   Opacity : float
);
public: void AddLineArrowAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float ArrowWidth,
   float ArrowHeight,
   bool ArrowFilled,
   float Opacity
) 
public:
void AddLineArrowAnnotInteractive( 
   Color BorderColor,
   float BorderWidth,
   float ArrowWidth,
   float ArrowHeight,
   bool ArrowFilled,
   float Opacity
) 

Parameters

BorderColor
A color object that defines the required color of the newly added line arrow annotation. It corresponds to the AnnotationLineArrow.StrokeColor property.
BorderWidth
The width of the newly added line arrow annotation, in inches. It is the width of the line and it corresponds to the AnnotationLineArrow.BorderWidth property.
ArrowWidth
The width of the arrow, in inches. This value only defines the width of the very arrow on the end of the line.
ArrowHeight
The height of the arrow, in inches. This value only defines the height of the very arrow on the end of the line.
ArrowFilled
Set this parameter to true to depict a sharp arrowhead. Set it to false to paint a rounded arrowhead.
Opacity
The opacity value of the newly added line arrow 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.
Example
How to allow users to interactively add a line arrow annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddLineArrow_Click(ByVal sender As Object, ByVal e As EventArgs)
    GdViewer1.AddLineArrowAnnotInteractive(Color.BlueViolet, 0.1F, 2, 5, False, 1)
    If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddLineArrowAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddLineArrow_Click(object sender, EventArgs e)
{
    GdViewer1.AddLineArrowAnnotInteractive(Color.BlueViolet, 0.1f, 2, 5, false, 1);
    if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddLineArrowAnnotInteractive");
}
See Also