Class Rect
A rectangle that can be drawn on a page.
public class Rect : IDrawable
- Inheritance
-
Rect
- Implements
- Inherited Members
Constructors
Rect()
The default constructor.
public Rect()
Rect(float, float, float, float)
Creates a rectangle with its top left corner at x, y and the specified width and height.
public Rect(float x, float y, float w, float h)
Parameters
Methods
DrawOn(Page)
Draws this rectangle on the specified page.
public float[] DrawOn(Page page)
Parameters
pagePage
Returns
- float[]
ScaleBy(float)
Scales the width, height and corner radius of this rectangle by the specified factor. The location does not change.
public Rect ScaleBy(float factor)
Parameters
factorfloat
Returns
SetActualText(string)
Sets the actual text of this rectangle, used for accessibility.
public Rect SetActualText(string actualText)
Parameters
actualTextstring
Returns
SetAltDescription(string)
Sets the alternate description of this rectangle, used for accessibility.
public Rect SetAltDescription(string altDescription)
Parameters
altDescriptionstring
Returns
SetBorderColor(int)
Sets the border color as a 0xRRGGBB value. Color.transparent removes the border.
public Rect SetBorderColor(int color)
Parameters
colorint
Returns
SetBorderColor(float[])
Sets the border color from an array of red, green and blue values, or null for no border.
public Rect SetBorderColor(float[] rgbColor)
Parameters
rgbColorfloat[]
Returns
SetBorderDashPattern(string)
Sets the dash pattern of the border.
public Rect SetBorderDashPattern(string borderPattern)
Parameters
borderPatternstring
Returns
SetBorderWidth(float)
Sets the border width.
public Rect SetBorderWidth(float width)
Parameters
widthfloat
Returns
SetCornerRadius(float)
Sets the corner radius.
public Rect SetCornerRadius(float r)
Parameters
rfloat
Returns
SetFillColor(int)
Sets the fill color as a 0xRRGGBB value. Color.transparent leaves it unchanged.
public Rect SetFillColor(int color)
Parameters
colorint
Returns
SetFillColor(float[])
Sets the fill color from an array of red, green and blue values.
public Rect SetFillColor(float[] rgbColor)
Parameters
rgbColorfloat[]
Returns
SetGoToAction(string)
Sets the destination key used when this rectangle is clicked.
public Rect SetGoToAction(string key)
Parameters
keystring
Returns
SetLanguage(string)
Sets the language of this rectangle, used for accessibility. When it is not set, the language of the document is used.
public Rect SetLanguage(string language)
Parameters
languagestring
Returns
SetLocation(float, float)
Sets the location of the top left corner of this rectangle.
public Rect SetLocation(float x, float y)
Parameters
Returns
SetSize(float, float)
Sets the size of this rectangle.
public Rect SetSize(float w, float h)
Parameters
Returns
SetURIAction(string)
Sets the URI opened when this rectangle is clicked.
public Rect SetURIAction(string uri)
Parameters
uristring