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 As Color, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single, _
ByVal As Boolean, _
ByVal As Single _
)
public void AddLineArrowAnnotInteractive(
Color ,
float ,
float ,
float ,
bool ,
float
)
public procedure AddLineArrowAnnotInteractive(
: Color;
: Single;
: Single;
: Single;
: Boolean;
: Single
);
public function AddLineArrowAnnotInteractive(
: Color,
: float,
: float,
: float,
: boolean,
: float
);
public: void AddLineArrowAnnotInteractive(
Color ,
float ,
float ,
float ,
bool ,
float
)
public:
void AddLineArrowAnnotInteractive(
Color ,
float ,
float ,
float ,
bool ,
float
)
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).
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");
}
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