public class RoundRect extends AbstractShape
| Constructor and Description |
|---|
RoundRect(float cornerRadius)
Creates a rounded rect with equal radiuss for both x-axis and y-axis (quarter of a circle).
|
RoundRect(float cornerRadiusX,
float cornerRadiusY)
Creates a rounded rect with potentially different radiuss for both x-axis and y-axis (quarter of an ellipse).
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
float width,
float height)
Adds (the path of) the shape without drawing anything.
|
protected void |
addRoundRect(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
float width,
float height,
float cornerRadiusX,
float cornerRadiusY)
create points clockwise starting in upper left corner
|
draw, fillpublic RoundRect(float cornerRadius)
cornerRadius - the radius of the corner circle.public RoundRect(float cornerRadiusX,
float cornerRadiusY)
cornerRadiusX - the radius in x-direction of the corner ellipse.cornerRadiusY - the radius in y-direction of the corner ellipse.public void add(org.apache.pdfbox.pdmodel.PDDocument pdDocument,
org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
float width,
float height)
throws IOException
ShapepdDocument - the underlying pdfbox document.contentStream - the stream to draw to.upperLeft - the upper left position to start drawing.width - the width of the bounding box.height - the height of the bounding box.IOException - by pdfboxprotected void addRoundRect(org.apache.pdfbox.pdmodel.PDPageContentStream contentStream,
Position upperLeft,
float width,
float height,
float cornerRadiusX,
float cornerRadiusY)
throws IOException
a b
----------
/ \
h | | c
| |
| |
g \ / d
----------
f e
contentStream - the content stream.upperLeft - the upper left pointwidth - the widthheight - the heightcornerRadiusX - the corner radius in x directioncornerRadiusY - the corner radius in y directionIOException - by pdfboxCopyright © 2022. All rights reserved.