Package com.itextpdf.svg.renderers.impl
Class EllipseSvgNodeRenderer
- java.lang.Object
-
- com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
-
- com.itextpdf.svg.renderers.impl.EllipseSvgNodeRenderer
-
- All Implemented Interfaces:
ISvgNodeRenderer
- Direct Known Subclasses:
CircleSvgNodeRenderer
public class EllipseSvgNodeRenderer extends AbstractSvgNodeRenderer
ISvgNodeRenderer
implementation for the <circle> tag.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
AbstractSvgNodeRenderer.FillProperties, AbstractSvgNodeRenderer.StrokeProperties
-
-
Field Summary
Fields Modifier and Type Field Description (package private) float
cx
(package private) float
cy
(package private) float
rx
(package private) float
ry
-
Fields inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
attributesAndStyles, doFill, doStroke
-
-
Constructor Summary
Constructors Constructor Description EllipseSvgNodeRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ISvgNodeRenderer
createDeepCopy()
Creates a deep copy of this renderer, including it's subtree of childrenprotected void
doDraw(SvgDrawContext context)
Draws this element to a canvas-like object maintained in the context.(package private) void
doStrokeOrFill(java.lang.String fillRuleRawValue, PdfCanvas currentCanvas)
Do stroke or fill based ondoFill/doStroke
fields.Rectangle
getObjectBoundingBox(SvgDrawContext context)
Calculates the current object bounding box.protected void
initCenter(SvgDrawContext context)
Initialize ellipse cx and cy.protected boolean
setParameters()
Deprecated.protected boolean
setParameters(SvgDrawContext context)
Fetches a map of String values by calling getAttribute(String s) method and maps it's values to arc parameter cx, cy , rx, ry respectively-
Methods inherited from class com.itextpdf.svg.renderers.impl.AbstractSvgNodeRenderer
applyFillAndStrokeProperties, applyNonScalingStrokeTransform, calculateViewPortTranslation, canConstructViewPort, canElementFill, deepCopyAttributesAndStyles, draw, getAttribute, getAttributeMapCopy, getAttributeOrDefault, getCurrentFontSize, getCurrentFontSize, getCurrentViewBox, getParent, getParentClipPath, isHidden, parseAbsoluteLength, parseHorizontalLength, parseVerticalLength, postDraw, preDraw, retrieveAlignAndMeet, setAttribute, setAttributesAndStyles, setParent
-
-
-
-
Method Detail
-
doDraw
protected void doDraw(SvgDrawContext context)
Description copied from class:AbstractSvgNodeRenderer
Draws this element to a canvas-like object maintained in the context.- Specified by:
doDraw
in classAbstractSvgNodeRenderer
- Parameters:
context
- the object that knows the place to draw this element and maintains its state
-
getObjectBoundingBox
public Rectangle getObjectBoundingBox(SvgDrawContext context)
Description copied from interface:ISvgNodeRenderer
Calculates the current object bounding box.- Parameters:
context
- the current context, for instance it contains current viewport and available font data- Returns:
- the
Rectangle
representing the current object's bounding box, or null if bounding box is undefined
-
setParameters
@Deprecated protected boolean setParameters()
Deprecated.Fetches a map of String values by calling getAttribute(String s) method and maps it's values to arc parameter cx, cy , rx, ry respectivelyThis method is deprecated in favour of
setParameters(SvgDrawContext)
, because x/y/rx/ry can contain relative values which can't be resolved withoutSvgDrawContext
.- Returns:
- boolean values to indicate whether all values exit or not
-
setParameters
protected boolean setParameters(SvgDrawContext context)
Fetches a map of String values by calling getAttribute(String s) method and maps it's values to arc parameter cx, cy , rx, ry respectively- Parameters:
context
- the SVG draw context- Returns:
- boolean values to indicate whether all values exit or not
-
initCenter
protected void initCenter(SvgDrawContext context)
Initialize ellipse cx and cy.- Parameters:
context
- svg draw context
-
createDeepCopy
public ISvgNodeRenderer createDeepCopy()
Description copied from interface:ISvgNodeRenderer
Creates a deep copy of this renderer, including it's subtree of children- Returns:
- deep copy of this renderer
-
doStrokeOrFill
void doStrokeOrFill(java.lang.String fillRuleRawValue, PdfCanvas currentCanvas)
Description copied from class:AbstractSvgNodeRenderer
Do stroke or fill based ondoFill/doStroke
fields.- Overrides:
doStrokeOrFill
in classAbstractSvgNodeRenderer
- Parameters:
fillRuleRawValue
- fill rule attribute value.currentCanvas
- current canvas to draw on.
-
-