Set this parameter to true, if you want to fill the ellipse using the defined background color, otherwise set it to false.
Set this parameter to true, if you want to stroke the ellipse using the defined border color, otherwise set it to false.
A color object that defines the required background color of the newly added ellipse annotation.
A color object that defines the required border color of the newly added ellipse annotation.
The border width of the newly added ellipse annotation, in inches.
The opacity value of the newly added ellipse annotation, from 0 (full transparency) to 1 (full opacity).
Example





In This Topic
GdPicture14.WPF Namespace / GdViewer Class / AddEllipseAnnotInteractive Method

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, respectively to both the PreviewBeforeAnnotationAddedByUser and the PreviewAnnotationAddedByUser 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 Sub AddEllipseAnnotInteractive( _
   ByVal Fill As Boolean, _
   ByVal Stroke As Boolean, _
   ByVal BackColor As Color, _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal Opacity As Single _
) 
public void AddEllipseAnnotInteractive( 
   bool Fill,
   bool Stroke,
   Color BackColor,
   Color BorderColor,
   float BorderWidth,
   float Opacity
)
public procedure AddEllipseAnnotInteractive( 
    Fill: Boolean;
    Stroke: Boolean;
    BackColor: Color;
    BorderColor: Color;
    BorderWidth: Single;
    Opacity: Single
); 
public function AddEllipseAnnotInteractive( 
   Fill : boolean,
   Stroke : boolean,
   BackColor : Color,
   BorderColor : Color,
   BorderWidth : float,
   Opacity : float
);
public: void AddEllipseAnnotInteractive( 
   bool Fill,
   bool Stroke,
   Color BackColor,
   Color BorderColor,
   float BorderWidth,
   float Opacity
) 
public:
void AddEllipseAnnotInteractive( 
   bool Fill,
   bool Stroke,
   Color BackColor,
   Color BorderColor,
   float BorderWidth,
   float Opacity
) 

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).
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 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.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 96, 158, 160), 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.FromArgb(255, 255, 255, 0), Color.FromArgb(255, 96, 158, 160), 0.05f, 0.65f);
    if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddEllipseAnnotInteractive");
}
See Also