Class Index

Classes


Class PDFNet.PatternColor

PDFNet.PatternColor

Class Summary
Constructor Attributes Constructor Name and Description
 
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.
Method Summary
Method Attributes Method Name and Description
 
assign(right)
Create a PatternColor from the given SDF/Cos object listed under Pattern entry in page Resource dictionary
<static>  
PDFNet.PatternColor.create(pattern)
Constructor
 
Frees the native memory of the object.
 
 
 
 
 
 
<static>  
PDFNet.PatternColor.getTypeFromObj(pattern)
[Documentation Not Yet Added]
 
 
Class Detail
PDFNet.PatternColor(id)
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.
Parameters:
id
Method Detail
assign(right)
Create a PatternColor from the given SDF/Cos object listed under Pattern entry in page Resource dictionary
Parameters:
{PatternColor} right
(generated documentation)

<static> {PatternColor} PDFNet.PatternColor.create(pattern)
Constructor
Parameters:
{Obj} pattern
(generated documentation)
Returns:
{PatternColor} A promise that resolves to an object of type: "PatternColor" (generated documentation)

destroy()
Frees the native memory of the object.

{rect} getBBox()
Returns:
{rect} A promise that resolves to a rectangle in the pattern coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern cell's bounding box. These boundaries are used to clip the pattern cell.

{matrix2d} getMatrix()
Returns:
{matrix2d} A promise that resolves to pattern matrix, a transformation matrix that maps the pattern's internal coordinate system to the default coordinate system of the pattern's parent content stream (the content stream in which the pattern is defined as a resource). The concatenation of the pattern matrix with that of the parent content stream establishes the pattern coordinate space, within which all graphics objects in the pattern are interpreted.

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to the underlying SDF/Cos object

{Shading} getShading()
Returns:
{Shading} A promise that resolves to the shading object defining the shading pattern's gradient fill.

{number} getTilingType()
Return value enum:
PDFNet.PatternColor.TilingType = {
	e_constant_spacing : 0
	e_no_distortion : 1
	e_constant_spacing_fast_fill : 2
}
Returns:
{number} A promise that resolves to the tiling type identifier that controls adjustments to the spacing of tiles relative to the device pixel grid:

{number} getType()
Return value enum:
PDFNet.PatternColor.Type = {
	e_uncolored_tiling_pattern : 0
	e_colored_tiling_pattern : 1
	e_shading : 2
	e_null : 3
}
Returns:
{number} A promise that resolves to the pattern type

<static> {[ERROR]} PDFNet.PatternColor.getTypeFromObj(pattern)
[Documentation Not Yet Added]
Parameters:
{Obj} pattern
(generated documentation)
Returns:
{[ERROR]} A promise that resolves to an unknown type (generated documentation)

{number} getXStep()
Returns:
{number} A promise that resolves to the desired horizontal spacing between pattern cells, measured in the pattern coordinate system.

{number} getYStep()
Returns:
{number} A promise that resolves to the desired vertical spacing between pattern cells, measured in the pattern coordinate system.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Nov 17 2016 16:54:45 GMT-0800 (PST)