Package com.evopdf
Class PageGraphicElement
java.lang.Object
com.evopdf.PageElement
com.evopdf.PageGraphicElement
- Direct Known Subclasses:
BezierCurveElement
,EllipseArcElement
,EllipseElement
,EllipseSliceElement
,HtmlToImageElement
,HtmlToPdfElement
,ImageElement
,LineElement
,PathElement
,PolygonElement
,RectangleElement
,TextElement
This abstract class is the base class for all graphic elements that can be
added to a PDF document
-
Method Summary
Modifier and TypeMethodDescriptionGets element background colorblending()
Gets blending mode for transparent rendering mode of the elementGets the clip rectangle applied when the element is rendered in PDFGets element foreground colorgradient()
Gets the gradient used to fill a shapeGets the line style for elements rendering linesint
opacity()
Gets the element opacity.void
rotate
(float rotateAngle) Rotates the coordinate system axes clockwise by the specified angle before rendering the element.void
scale
(float sx, float sy) Scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate systemvoid
setBackColor
(RgbColor backColor) Sets element background colorvoid
setBlending
(Blending blending) Sets blending mode for transparent rendering mode of the elementvoid
setClipRectangle
(RectangleFloat clipRectangle) Sets the clip rectangle applied when the element is rendered in PDFvoid
setForeColor
(RgbColor foreColor) Sets element foreground colorvoid
setGradient
(GradientColor gradientColor) Sets the gradient used to fill a shapevoid
setLineStyle
(LineStyle lineStyle) Sets the line style for elements rendering linesvoid
setOpacity
(int opacity) Sets the element opacity.void
skew
(float skewXAngle, float skewYAngle) Skews the x axis by an skewXAngle and the y axis by an skewYAngle before rendering the elementvoid
translate
(float tx, float ty) Translates the coordinate system before rendering the element.
-
Method Details
-
backColor
Gets element background color- Returns:
- element background color
-
setBackColor
Sets element background color- Parameters:
backColor
- element background color to set
-
foreColor
Gets element foreground color- Returns:
- element foreground color
-
setForeColor
Sets element foreground color- Parameters:
foreColor
- element foreground color to set
-
opacity
public int opacity()Gets the element opacity. The opacity is expressed as a value between 0 and 100. 0 means completely transparent and 100 completely opaque. The default value of this property is 100.- Returns:
- the element opacity
-
setOpacity
public void setOpacity(int opacity) Sets the element opacity. The opacity is expressed as a value between 0 and 100. 0 means completely transparent and 100 completely opaque.- Parameters:
opacity
- the element opacity to set
-
blending
Gets blending mode for transparent rendering mode of the element- Returns:
- the blending mode
-
setBlending
Sets blending mode for transparent rendering mode of the element- Parameters:
blending
- the blending mode to set
-
lineStyle
Gets the line style for elements rendering lines- Returns:
- the line style
-
setLineStyle
Sets the line style for elements rendering lines- Parameters:
lineStyle
- the line style to set
-
gradient
Gets the gradient used to fill a shape- Returns:
- the gradient used to fill a shape
-
setGradient
Sets the gradient used to fill a shape- Parameters:
gradientColor
- the gradient used to fill a shape
-
translate
public void translate(float tx, float ty) Translates the coordinate system before rendering the element. The coordinates of the element are relative to the translated coordinate system- Parameters:
tx
- the distance to translate the origin of the coordinate system in the horizontal directionty
- distance to translate the origin of the coordinate system in the vertical direction
-
scale
public void scale(float sx, float sy) Scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system- Parameters:
sx
- the value by which to scale coordinate system in the x-axis directionsy
- the value by which to scale coordinate system in the y-axis direction
-
rotate
public void rotate(float rotateAngle) Rotates the coordinate system axes clockwise by the specified angle before rendering the element. The coordinates of the element are relative to the rotated coordinates system. For text rotation use theTextElement.textAngle()
property of theTextElement
- Parameters:
rotateAngle
- the rotation angle in degrees
-
skew
public void skew(float skewXAngle, float skewYAngle) Skews the x axis by an skewXAngle and the y axis by an skewYAngle before rendering the element- Parameters:
skewXAngle
- skew x angleskewYAngle
- skew y angle
-
clipRectangle
Gets the clip rectangle applied when the element is rendered in PDF- Returns:
- the clip rectangle applied when the element is rendered in PDF
-
setClipRectangle
Sets the clip rectangle applied when the element is rendered in PDF- Parameters:
clipRectangle
- the clip rectangle to set
-