The content of the newly added rubber stamp, that means the text to be displayed in the annotation bounding box.
A color object that defines the required color of the used font for displaying the specified text.
The name of the font used to write the annotation content, for example Arial.
A member of the FontStyle enumeration. The font style of the used font for displaying the annotation content.
A color object that defines the required border color of the newly added rubber stamp annotation.
The border width of the newly added rubber stamp annotation, in inches.
The opacity value of the newly added rubber stamp annotation, from 0 (full transparency) to 1 (full opacity).
The clockwise rotation of the newly added rubber stamp annotation, in degrees.
Example





In This Topic
GdPicture14 Namespace / GdViewer Class / AddRubberStampAnnotInteractive Method

AddRubberStampAnnotInteractive Method (GdViewer)

In This Topic
Allows users to interactively add a new rubber stamp 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 shows a stamp mark of the specified stamp within the area defined by the user.

The type of the newly added annotation object is GdPictureAnnotationType.AnnotationTypeRubberStamp. You can change the annotation properties directly using the GdPicture14.Annotations.AnnotationRubberStamp 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 rubber stamp annotation using the mouse on the current page of the document displayed in the GdViewer control.
Syntax
'Declaration
 
Public Sub AddRubberStampAnnotInteractive( _
   ByVal Text As String, _
   ByVal ForeColor As Color, _
   ByVal FontName As String, _
   ByVal FontStyle As FontStyle, _
   ByVal BorderColor As Color, _
   ByVal BorderWidth As Single, _
   ByVal Opacity As Single, _
   ByVal Rotation As Single _
) 
public void AddRubberStampAnnotInteractive( 
   string Text,
   Color ForeColor,
   string FontName,
   FontStyle FontStyle,
   Color BorderColor,
   float BorderWidth,
   float Opacity,
   float Rotation
)
public procedure AddRubberStampAnnotInteractive( 
    Text: String;
    ForeColor: Color;
    FontName: String;
    FontStyle: FontStyle;
    BorderColor: Color;
    BorderWidth: Single;
    Opacity: Single;
    Rotation: Single
); 
public function AddRubberStampAnnotInteractive( 
   Text : String,
   ForeColor : Color,
   FontName : String,
   FontStyle : FontStyle,
   BorderColor : Color,
   BorderWidth : float,
   Opacity : float,
   Rotation : float
);
public: void AddRubberStampAnnotInteractive( 
   string* Text,
   Color ForeColor,
   string* FontName,
   FontStyle FontStyle,
   Color BorderColor,
   float BorderWidth,
   float Opacity,
   float Rotation
) 
public:
void AddRubberStampAnnotInteractive( 
   String^ Text,
   Color ForeColor,
   String^ FontName,
   FontStyle FontStyle,
   Color BorderColor,
   float BorderWidth,
   float Opacity,
   float Rotation
) 

Parameters

Text
The content of the newly added rubber stamp, that means the text to be displayed in the annotation bounding box.
ForeColor
A color object that defines the required color of the used font for displaying the specified text.
FontName
The name of the font used to write the annotation content, for example Arial.
FontStyle
A member of the FontStyle enumeration. The font style of the used font for displaying the annotation content.
BorderColor
A color object that defines the required border color of the newly added rubber stamp annotation.
BorderWidth
The border width of the newly added rubber stamp annotation, in inches.
Opacity
The opacity value of the newly added rubber stamp annotation, from 0 (full transparency) to 1 (full opacity).
Rotation
The clockwise rotation of the newly added rubber stamp annotation, in degrees.
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 rubber stamp annotation on the currently displayed page.
'We assume that the GdViewer1 control has been properly integrated.
Sub buttonAddRubberStamp_Click(ByVal sender As Object, ByVal e As EventArgs)
    GdViewer1.AddRubberStampAnnotInteractive("GdPicture", Color.DarkGreen, "Arial", FontStyle.Bold, Color.DarkOliveGreen, 0.1F, 0.5F, 345)
    If GdViewer1.GetStat() <> GdPictureStatus.OK Then MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddRubberStampAnnotInteractive")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
void buttonAddRubberStamp_Click(object sender, EventArgs e)
{
    GdViewer1.AddRubberStampAnnotInteractive("GdPicture", Color.DarkGreen, "Arial", FontStyle.Bold, Color.DarkOliveGreen, 0.1f, 0.5f, 345);
    if (GdViewer1.GetStat() != GdPictureStatus.OK) MessageBox.Show("Error!  Status: " + GdViewer1.GetStat().ToString(), "AddRubberStampAnnotInteractive");
}
See Also