AddEllipseAnnotInteractive Method (GdViewer)
In This Topic
Allows users to interactively add a new ellipse 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 enables users to draw a filled and bordered ellipse or circle by adjusting its height and width continuously using the mouse.
The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeEllipse. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationEllipse 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 ellipse annotation using the mouse on the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
Public Sub AddEllipseAnnotInteractive( _
ByVal As Boolean, _
ByVal As Boolean, _
ByVal As Color, _
ByVal As Color, _
ByVal As Single, _
ByVal As Single _
)
public void AddEllipseAnnotInteractive(
bool ,
bool ,
Color ,
Color ,
float ,
float
)
public procedure AddEllipseAnnotInteractive(
: Boolean;
: Boolean;
: Color;
: Color;
: Single;
: Single
);
public function AddEllipseAnnotInteractive(
: boolean,
: boolean,
: Color,
: Color,
: float,
: float
);
public: void AddEllipseAnnotInteractive(
bool ,
bool ,
Color ,
Color ,
float ,
float
)
public:
void AddEllipseAnnotInteractive(
bool ,
bool ,
Color ,
Color ,
float ,
float
)
Parameters
- Fill
- Set this parameter to true, if you want to fill the ellipse using the defined background color, otherwise set it to false.
- Stroke
- Set this parameter to true, if you want to stroke the ellipse using the defined border color, otherwise set it to false.
- BackColor
- A color object that defines the required background color of the newly added ellipse annotation.
- BorderColor
- A color object that defines the required border color of the newly added ellipse annotation.
- BorderWidth
- The border width of the newly added ellipse annotation, in inches.
- Opacity
- The opacity value of the newly added ellipse annotation, from 0 (full transparency) to 1 (full opacity).
Example
How to allow users to interactively add an ellipse annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddEllipse_Click(ByVal sender As Object, ByVal e As EventArgs)
GdViewer1.AddEllipseAnnotInteractive(true, true, Color.Yellow, Color.CadetBlue, 0.05F, 0.65F)
If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEllipseAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddEllipse_Click(object sender, EventArgs e)
{
GdViewer1.AddEllipseAnnotInteractive(true, true, Color.Yellow, Color.CadetBlue, 0.05f, 0.65f);
if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEllipseAnnotInteractive");
}
Example
How to allow users to interactively add an ellipse annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddEllipse_Click(ByVal sender As Object, ByVal e As EventArgs)
GdViewer1.AddEllipseAnnotInteractive(true, true, Color.Yellow, Color.CadetBlue, 0.05F, 0.65F)
If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEllipseAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddEllipse_Click(object sender, EventArgs e)
{
GdViewer1.AddEllipseAnnotInteractive(true, true, Color.Yellow, Color.CadetBlue, 0.05f, 0.65f);
if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error! Status: " + GdViewer1.GetStat().ToString(), "AddEllipseAnnotInteractive");
}
See Also