public class HatchingPattern extends UncolouredTilingPattern
<p>Realizes uncoloured hatching pattern (parallel lines).</p>
<p>Typical usages are the following:</p>
<xmp>
[C#]
Pdf pdf = new Pdf();
Section sec = pdf.Sections.Add();
Graph graph = new Graph(sec, 100, 700);
sec.Paragraphs.Add(graph);
Rectangle rect = new Rectangle(0, 600, 200, 100);
graph.Shapes.Add(rect);
HatchingPattern pattern = new HatchingPattern(10, 45);
Color fillColor = new Color();
fillColor.PatternColorSpace = pattern;
rect.GraphInfo.FillColor = fillColor;
rect.GraphInfo.IsFilled = true;
pdf.save(....);
</xmp>
Constructor and Description |
---|
HatchingPattern()
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern |
HatchingPattern(float spacing_0)
Initializes a new instance of the
T:Aspose.Pdf.HatchingPattern with value of spacing between lines. |
HatchingPattern(float spacing_0,
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_0,
float angle,
float lineWidth_1)
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_0)
Specifies a width of the lines.
|
completeClone, deepClone, getColor
getHeight, getPaintType, getTile, getTilingType, getWidth, getxStep, getyStep, setHeight, setPaintType, setTile, setTilingType, setWidth, setxStep, setyStep
getPatternIndex, getPatternType, getRotationAngle, getSkewX, getSkewY, getxPos, getxScale, getyPos, getyScale, setPatternIndex, setPatternType, setRotationAngle, setSkewX, setSkewY, setxPos, setxScale, setyPos, setyScale
public HatchingPattern()
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
public HatchingPattern(float spacing_0)
Initializes a new instance of the T:Aspose.Pdf.HatchingPattern
with value of spacing between lines.
public HatchingPattern(float spacing_0, 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_0, float angle, float lineWidth_1)
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_0)
Specifies a width of the lines.
public void setColor(Color color)
UncolouredTilingPattern
Sets a color of tile.
setColor
in class UncolouredTilingPattern
Copyright © 2016 Aspose. All Rights Reserved.