| java.lang.Object | |||
| ↳ | com.pdftron.layout.ContentElement | ||
| ↳ | com.pdftron.layout.ContentNode | ||
| ↳ | com.pdftron.layout.Shape | ||
A Shape is a content element that draws a preset shape such as a line, a rectangle or an oval.
A shape can carry a background color or a background image, an outline, and it can hold text in its text box.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | Shape.ShapeType | The preset geometry of a Shape. |
|||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| double | getArrowHeadSize() | ||||||||||
| double | getCornerRadius() | ||||||||||
| boolean | getFlipHorizontal() | ||||||||||
| boolean | getFlipVertical() | ||||||||||
| double | getHeight() | ||||||||||
| double | getOutlineThickness() | ||||||||||
| double | getRotation() | ||||||||||
| ContentContainer |
getTextBox()
Gets the text box of the shape, which content can be added to.
| ||||||||||
| Shape.ShapeType | getType() | ||||||||||
| double | getWidth() | ||||||||||
| void |
setArrowHeadSize(double sizePoints)
Sets the size of the arrow heads of line shapes.
| ||||||||||
| void |
setBackgroundColor(int red, int green, int blue)
Sets the background color of the shape.
| ||||||||||
| void |
setBackgroundImageFilter(Filter imageFilter)
Sets an image as the background of the shape.
| ||||||||||
| void |
setBackgroundImagePath(String filePath)
Sets an image as the background of the shape.
| ||||||||||
| void |
setCornerRadius(double radiusPoints)
Sets the corner radius of rounded rectangle shapes.
| ||||||||||
| void |
setFlipHorizontal(boolean value)
Sets whether the shape is mirrored horizontally.
| ||||||||||
| void |
setFlipVertical(boolean value)
Sets whether the shape is mirrored vertically.
| ||||||||||
| void |
setHeight(double heightPoints)
Sets the height of the shape.
| ||||||||||
| void |
setOutlineColor(int red, int green, int blue)
Sets the outline color of the shape.
| ||||||||||
| void |
setOutlineThickness(double thicknessPoints)
Sets the outline thickness of the shape.
| ||||||||||
| void |
setRotation(double angle)
Sets the rotation of the shape.
| ||||||||||
| void |
setType(Shape.ShapeType type)
Sets the preset geometry of the shape.
| ||||||||||
| void |
setWidth(double widthPoints)
Sets the width of the shape.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.layout.ContentNode
| |||||||||||
From class
com.pdftron.layout.ContentElement
| |||||||||||
From class
java.lang.Object
| |||||||||||
Gets the text box of the shape, which content can be added to.
| PDFNetException |
|---|
Sets the size of the arrow heads of line shapes.
| sizePoints | The arrow head size in points |
|---|
| PDFNetException |
|---|
Sets the background color of the shape.
| red | The red component of the color |
|---|---|
| green | The green component of the color |
| blue | The blue component of the color |
| PDFNetException |
|---|
Sets an image as the background of the shape.
| imageFilter | A filter providing the image data |
|---|
| PDFNetException |
|---|
Sets an image as the background of the shape.
| filePath | The path of the image file |
|---|
| PDFNetException |
|---|
Sets the corner radius of rounded rectangle shapes.
| radiusPoints | The corner radius in points |
|---|
| PDFNetException |
|---|
Sets whether the shape is mirrored horizontally.
| value | true to flip the shape horizontally |
|---|
| PDFNetException |
|---|
Sets whether the shape is mirrored vertically.
| value | true to flip the shape vertically |
|---|
| PDFNetException |
|---|
Sets the outline color of the shape.
| red | The red component of the color |
|---|---|
| green | The green component of the color |
| blue | The blue component of the color |
| PDFNetException |
|---|
Sets the outline thickness of the shape.
| thicknessPoints | The outline thickness in points |
|---|
| PDFNetException |
|---|
Sets the rotation of the shape.
| angle | The rotation angle, in degrees |
|---|
| PDFNetException |
|---|