java.lang.Object | |
↳ | com.pdftron.pdf.PatternColor |
Patterns are quite general, and have many uses; for example, they can be used to create various graphical textures, such as weaves, brick walls, sunbursts, and similar geometrical and chromatic effects. Patterns are specified in a special family of color spaces named Pattern, whose 'color values' are PatternColor objects instead of the numeric component values used with other spaces. Therefore PatternColor is to pattern color space what is ColorPt to all other color spaces. A tiling pattern consists of a small graphical figure called a pattern cell. Painting with the pattern replicates the cell at fixed horizontal and vertical intervals to fill an area. The effect is as if the figure were painted on the surface of a clear glass tile, identical copies of which were then laid down in an array covering the area and trimmed to its boundaries. This is called tiling the area. The pattern cell can include graphical elements such as filled areas, text, and sampled images. Its shape need not be rectangular, and the spacing of tiles can differ from the dimensions of the cell itself. The order in which individual tiles (instances of the cell) are painted is unspecified and unpredictable; it is inadvisable for the figures on adjacent tiles to overlap.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_colored_tiling_pattern | The Constant e_colored_tiling_pattern. | |||||||||
int | e_constant_spacing | The Constant e_constant_spacing. | |||||||||
int | e_constant_spacing_fast_fill | The Constant e_constant_spacing_fast_fill. | |||||||||
int | e_no_distortion | The Constant e_no_distortion. | |||||||||
int | e_null | The Constant e_null. | |||||||||
int | e_shading | The Constant e_shading. | |||||||||
int | e_uncolored_tiling_pattern | The Constant e_uncolored_tiling_pattern. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PatternColor(Obj pattern)
Create a PatternColor from the given SDF/Cos object listed under Pattern entry
in page Resource dictionary.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Rect |
getBBox()
Get the bounding box.
| ||||||||||
Matrix2D |
getMatrix()
Get the matrix.
| ||||||||||
Obj |
getSDFObj()
Get the SDFObj.
| ||||||||||
Shading |
getShading()
Get the shading pattern's gradient fill.
| ||||||||||
int |
getTilingType()
Get the PatternColor tiling type.
| ||||||||||
int |
getType()
Get the PatternColor type.
| ||||||||||
static int |
getType(Obj pattern)
Get the type from given PatternColor
| ||||||||||
double |
getXStep()
Get the horizontal spacing between pattern cells
Note: that XStep and YStep may differ from the dimensions of the pattern cell implied by the BBox entry. | ||||||||||
double |
getYStep()
Get the vertical spacing between pattern cells
Note: for patterns other than Tiling this method throws an exception. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The Constant e_colored_tiling_pattern.
The Constant e_constant_spacing.
The Constant e_constant_spacing_fast_fill.
The Constant e_no_distortion.
The Constant e_null.
The Constant e_shading.
The Constant e_uncolored_tiling_pattern.
Create a PatternColor from the given SDF/Cos object listed under Pattern entry in page Resource dictionary.
pattern | the pattern |
---|
Get the bounding box.
Note: for patterns other than Tiling this method throws an exception.
PDFNetException |
---|
Get the matrix.
PDFNetException |
---|
Get the shading pattern's gradient fill.
Note: for patterns other than Shading this method throws an exception.
PDFNetException |
---|
Get the PatternColor tiling type.
Note: for patterns other than Tiling this method throws an exception.
PDFNetException |
---|
Get the type from given PatternColor
pattern | the given PatternColor |
---|
PDFNetException |
---|
Get the horizontal spacing between pattern cells
Note: that XStep and YStep may differ from the dimensions of the pattern cell implied by the BBox entry. This allows tiling with irregularly shaped figures. XStep and YStep may be either positive or negative, but not zero.
Note: for patterns other than Tiling this method throws an exception.
PDFNetException |
---|
Get the vertical spacing between pattern cells
Note: for patterns other than Tiling this method throws an exception.
PDFNetException |
---|