public class HatchingPattern extends UncolouredTilingPattern
Realizes uncoloured hatching pattern (parallel lines).
Typical usages are the following:
[Java] Pdf pdf = new Pdf(); Section sec = pdf.getSections().add(); Graph graph = new Graph(sec, 100, 700); sec.getParagraphs().add(graph); Rectangle rect = new Rectangle(0, 600, 200, 100); graph.getShapes().add(rect); HatchingPattern pattern = new HatchingPattern(10, 45); Color fillColor = new Color(); fillColor.setPatternColorSpace ( pattern); rect.getGraphInfo().setFillColor ( fillColor); rect.getGraphInfo().setFilled ( true); pdf.save(....);
Constructor and Description |
---|
HatchingPattern()
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern |
HatchingPattern(float spacing)
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern with value of spacing between lines. |
HatchingPattern(float spacing,
float angle)
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern with value of spacing between lines and a rotation angle of lines. |
HatchingPattern(float spacing,
float angle,
float lineWidth)
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern with value of spacing between lines, line width and a rotation angle of lines. |
Modifier and Type | Method and Description |
---|---|
float |
getLineWidth()
Returns a width of the lines.
|
float |
getSpacing()
Returns a distance between lines.
|
void |
setColor(Color color)
Sets a color of tile.
|
void |
setLineWidth(float lineWidth)
Specifies a width of the lines.
|
completeClone, deepClone, getColor
getHeight, getPaintType, getTile, getTilingType, getWidth, getxStep, getyStep, setHeight, setPaintType, setTile, setTilingType, setWidth, setxStep, setyStep
getPatternType, getRotationAngle, getSkewX, getSkewY, getxPos, getxScale, getyPos, getyScale, setPatternType, setRotationAngle, setSkewX, setSkewY, setxPos, setxScale, setyPos, setyScale
public HatchingPattern()
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
public HatchingPattern(float spacing)
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
with value of spacing between lines.
public HatchingPattern(float spacing, float angle)
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
with value of spacing between lines and a rotation angle of lines.
public HatchingPattern(float spacing, float angle, float lineWidth)
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
with value of spacing between lines, line width and a rotation angle of lines.
public float getSpacing()
Returns a distance between lines.
public float getLineWidth()
Returns a width of the lines.
public void setLineWidth(float lineWidth)
Specifies a width of the lines.
public void setColor(Color color)
UncolouredTilingPattern
Sets a color of tile.
setColor
in class UncolouredTilingPattern
Copyright © 2014 Aspose. All Rights Reserved.