Class PdfEllipse
java.lang.Object
cloud.opencode.base.pdf.content.PdfEllipse
- All Implemented Interfaces:
PdfElement
PDF Ellipse Element - Ellipse/Circle graphic
PDF 椭圆元素 - 椭圆/圆形图形
Features | 主要功能:
- Circle and ellipse creation - 圆形和椭圆创建
- Stroke and fill color configuration - 描边和填充颜色配置
- Stroke width customization - 描边宽度自定义
Usage Examples | 使用示例:
PdfEllipse circle = PdfEllipse.circle(200, 400, 50)
.fillColor(PdfColor.BLUE)
.strokeWidth(2f);
PdfEllipse ellipse = PdfEllipse.of(300, 500, 80, 40);
Security | 安全性:
- Thread-safe: No — mutable builder pattern - 线程安全: 否 — 可变构建器模式
- Null-safe: No — callers must ensure non-null values - 空值安全: 否 — 调用方需确保非空值
- Since:
- JDK 25, opencode-base-pdf V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic PdfEllipsebuilder()Creates an ellipse builder 创建椭圆构建器center(float x, float y) static PdfEllipsecircle(float centerX, float centerY, float radius) Creates a circle 创建圆形floatfloatfloatfloatfloatfloatgetX()Gets the x coordinate of this element 获取元素的 x 坐标floatgetY()Gets the y coordinate of this element 获取元素的 y 坐标booleanisCircle()booleanisFilled()static PdfEllipseof(float centerX, float centerY, float radiusX, float radiusY) Creates an ellipse 创建椭圆radius(float radius) radius(float radiusX, float radiusY) strokeColor(PdfColor color) strokeWidth(float width)
-
Method Details
-
circle
Creates a circle 创建圆形- Parameters:
centerX- center x | 中心点 xcenterY- center y | 中心点 yradius- radius | 半径- Returns:
- PdfEllipse instance | PdfEllipse 实例
-
of
Creates an ellipse 创建椭圆- Parameters:
centerX- center x | 中心点 xcenterY- center y | 中心点 yradiusX- x radius | x 半径radiusY- y radius | y 半径- Returns:
- PdfEllipse instance | PdfEllipse 实例
-
builder
Creates an ellipse builder 创建椭圆构建器- Returns:
- new PdfEllipse instance | 新 PdfEllipse 实例
-
center
-
radius
-
radius
-
strokeColor
-
fillColor
-
strokeWidth
-
getX
public float getX()Description copied from interface:PdfElementGets the x coordinate of this element 获取元素的 x 坐标- Specified by:
getXin interfacePdfElement- Returns:
- x coordinate | x 坐标
-
getY
public float getY()Description copied from interface:PdfElementGets the y coordinate of this element 获取元素的 y 坐标- Specified by:
getYin interfacePdfElement- Returns:
- y coordinate | y 坐标
-
getCenterX
public float getCenterX() -
getCenterY
public float getCenterY() -
getRadiusX
public float getRadiusX() -
getRadiusY
public float getRadiusY() -
getStrokeColor
-
getFillColor
-
getStrokeWidth
public float getStrokeWidth() -
isFilled
public boolean isFilled() -
isCircle
public boolean isCircle()
-