Class BaseAnnotation
The base class of the circle, square, polygon and text annotations.
public abstract class BaseAnnotation : IDrawable
- Inheritance
-
BaseAnnotation
- Implements
- Derived
- Inherited Members
Constructors
BaseAnnotation()
Creates an annotation. The circle, square, polygon and text annotations call it.
protected BaseAnnotation()
Methods
DrawOn(Page)
Adds this annotation to the specified page.
public float[] DrawOn(Page page)
Parameters
pagePage
Returns
- float[]
SetContents(string)
Sets the text contents of this annotation.
public BaseAnnotation SetContents(string contents)
Parameters
contentsstring
Returns
SetFillColor(int)
Sets the fill color as a 0xRRGGBB value. Color.transparent leaves it unchanged.
public BaseAnnotation SetFillColor(int color)
Parameters
colorint
Returns
SetFillColor(float[])
Sets the fill color from an array of red, green and blue values.
public BaseAnnotation SetFillColor(float[] fillColor)
Parameters
fillColorfloat[]
Returns
SetLocation(float, float)
Sets the location of this annotation.
public BaseAnnotation SetLocation(float x, float y)
Parameters
Returns
SetOpacity(float)
Sets the opacity of this annotation, from 0.0 (invisible) to 1.0 (opaque, the default). PDF/A-1 has no transparency, so a document of PDF_A_1A or PDF_A_1B ignores the opacity and draws the annotation opaque.
public BaseAnnotation SetOpacity(float opacity)
Parameters
opacityfloat
Returns
SetSize(float, float)
Sets the size of this annotation, measured from its location: its second point is w to the right of its location and h below it, whether SetLocation is called before or after.
public BaseAnnotation SetSize(float w, float h)
Parameters
Returns
SetTitle(string)
Sets the title of this annotation.
public BaseAnnotation SetTitle(string title)
Parameters
titlestring