public class UncolouredTilingPattern extends TilingPattern
Realizes uncoloured tiling pattern that is tiling pattern contains shapes or text or image with one common color or no color at all. In the later case a color of the tile will be inherited from current color state of document.
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); int xStep = 8; int yStep = 8; Graph tile1 = new Graph(xStep, yStep); tile1.PosX = 0; tile1.PosY = 0; Line line = new Line(new float [] {xStep/2, yStep, xStep/2, 0}); line.getGraphInfo().setColor ( null0; line.getGraphInfo().setLineWidth ( 0.1f); tile1.getShapes().add (line); line = new Line(new float [] {xStep, yStep/2, 0, yStep/2}); line.getGraphInfo().setColor ( null); line.getGraphInfo().setLineWidth ( 0.1f); tile1.getShapes().add (line); pdf.save(....);
Constructor and Description |
---|
UncolouredTilingPattern()
Initializes a new instance of the
T:Aspose.Pdf.Generator.LegacyXmlModel |
UncolouredTilingPattern(Color color)
Initializes a new instance of the
T:Aspose.Pdf.Generator.LegacyXmlModel with specified T:Aspose.Pdf.Color object. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone()
Copies all fields.
|
Object |
deepClone()
Copies all fields.
|
Color |
getColor()
Returns a color of tile.
|
void |
setColor(Color color)
Sets a color of tile.
|
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 UncolouredTilingPattern()
Initializes a new instance of the T:Aspose.Pdf.Generator.LegacyXmlModel
public UncolouredTilingPattern(Color color)
Initializes a new instance of the T:Aspose.Pdf.Generator.LegacyXmlModel
with specified T:Aspose.Pdf.Color
object.
public Color getColor()
Returns a color of tile.
public void setColor(Color color)
Sets a color of tile.
public Object completeClone()
Copies all fields. Tile is copied by value.
public Object deepClone()
Copies all fields. Tile is copied by reference. Shell be used for patterns that use one tile but different colors or matrix or steps or width, height.
deepClone
in class PatternColorSpace
Copyright © 2014 Aspose. All Rights Reserved.