aspose.pdf
Class HatchingPattern

java.lang.Object
  extended by aspose.pdf.PatternColorSpace
      extended by aspose.pdf.TilingPattern
          extended by aspose.pdf.UncolouredTilingPattern
              extended by aspose.pdf.HatchingPattern

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, 30); Color fillColor = new Color(); fillColor.setPatternColorSpace(pattern); rect.getGraphInfo().setFillColor(fillColor); rect.getGraphInfo().setIsFilled(true); pdf.save(....);


Field Summary
protected  float lineWidth
          A width of the lines.
protected  float spacing
          Spacing between lines.
 
Fields inherited from class aspose.pdf.UncolouredTilingPattern
color
 
Fields inherited from class aspose.pdf.TilingPattern
height, paintType, tile, tilingType, width, xStep, yStep
 
Fields inherited from class aspose.pdf.PatternColorSpace
patternType, rotationAngle, skewX, skewY, xPos, xScale, yPos, yScale
 
Constructor Summary
HatchingPattern()
          Initializes a new instance of the HatchingPattern
HatchingPattern(float spacing)
          Initializes a new instance of the HatchingPattern with value of spacing between lines.
HatchingPattern(float spacing, float angle)
          Initializes a new instance of the 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 HatchingPattern with value of spacing between lines, line width and a rotation angle of lines.
 
Method Summary
 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.
 
Methods inherited from class aspose.pdf.UncolouredTilingPattern
clone, completeClone, getColor
 
Methods inherited from class aspose.pdf.TilingPattern
completeCopyTo, copyTo, getHeight, getPaintType, getTile, getTilingType, getWidth, getxStep, getyStep, setHeight, setPaintType, setTile, setTilingType, setWidth, setxStep, setyStep
 
Methods inherited from class aspose.pdf.PatternColorSpace
copyTo, getPatternIndex, getPatternType, getRotationAngle, getSkewX, getSkewY, getxPos, getxScale, getyPos, getyScale, setPatternIndex, setPatternType, setRotationAngle, setSkewX, setSkewY, setxPos, setxScale, setyPos, setyScale
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spacing

protected float spacing
Spacing between lines.


lineWidth

protected float lineWidth
A width of the lines.

Constructor Detail

HatchingPattern

public HatchingPattern()
Initializes a new instance of the HatchingPattern


HatchingPattern

public HatchingPattern(float spacing)
Initializes a new instance of the HatchingPattern with value of spacing between lines.


HatchingPattern

public HatchingPattern(float spacing,
                       float angle)
Initializes a new instance of the HatchingPattern with value of spacing between lines and a rotation angle of lines.


HatchingPattern

public HatchingPattern(float spacing,
                       float angle,
                       float lineWidth)
Initializes a new instance of the HatchingPattern with value of spacing between lines, line width and a rotation angle of lines.

Method Detail

getSpacing

public float getSpacing()
Returns a distance between lines.


getLineWidth

public float getLineWidth()
Returns a width of the lines.


setLineWidth

public void setLineWidth(float lineWidth)
Specifies a width of the lines.


setColor

public void setColor(Color color)
Description copied from class: UncolouredTilingPattern
Sets a color of tile.

Overrides:
setColor in class UncolouredTilingPattern