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
ISvgNodeRenderer implementation for the <circle> tag.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractSvgNodeRenderer
AbstractSvgNodeRenderer.FillProperties, AbstractSvgNodeRenderer.StrokeProperties -
Field Summary
FieldsModifier and TypeFieldDescription(package private) float(package private) float(package private) float(package private) floatFields inherited from class AbstractSvgNodeRenderer
attributesAndStyles, doFill, doStroke -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a deep copy of this renderer, including it's subtree of childrenprotected voiddoDraw(SvgDrawContext context) Draws this element to a canvas-like object maintained in the context.(package private) voiddoStrokeOrFill(String fillRuleRawValue, PdfCanvas currentCanvas) Do stroke or fill based ondoFill/doStrokefields.getObjectBoundingBox(SvgDrawContext context) Calculates the current object bounding box.protected voidinitCenter(SvgDrawContext context) Initialize ellipse cx and cy.protected booleanDeprecated.protected booleansetParameters(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 respectivelyMethods inherited from class 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
-
Field Details
-
cx
float cx -
cy
float cy -
rx
float rx -
ry
float ry
-
-
Constructor Details
-
EllipseSvgNodeRenderer
public EllipseSvgNodeRenderer()
-
-
Method Details
-
doDraw
Description copied from class:AbstractSvgNodeRendererDraws this element to a canvas-like object maintained in the context.- Specified by:
doDrawin classAbstractSvgNodeRenderer- Parameters:
context- the object that knows the place to draw this element and maintains its state
-
getObjectBoundingBox
Description copied from interface:ISvgNodeRendererCalculates the current object bounding box.- Parameters:
context- the current context, for instance it contains current viewport and available font data- Returns:
- the
Rectanglerepresenting the current object's bounding box, or null if bounding box is undefined
-
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
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
Initialize ellipse cx and cy.- Parameters:
context- svg draw context
-
createDeepCopy
Description copied from interface:ISvgNodeRendererCreates a deep copy of this renderer, including it's subtree of children- Returns:
- deep copy of this renderer
-
doStrokeOrFill
Description copied from class:AbstractSvgNodeRendererDo stroke or fill based ondoFill/doStrokefields.- Overrides:
doStrokeOrFillin classAbstractSvgNodeRenderer- Parameters:
fillRuleRawValue- fill rule attribute value.currentCanvas- current canvas to draw on.
-