Package | org.purepdf.pdf |
Class | public class PdfShading |
Inheritance | PdfShading it.sephiroth.utils.ObjectHash |
Property | Defined By | ||
---|---|---|---|
antiAlias : Boolean | PdfShading | ||
bBox : Vector.<Number> | PdfShading | ||
colorDetails : ColorDetails [read-only] | PdfShading | ||
colorSpace : RGBColor | PdfShading | ||
shadingName : PdfName [read-only] | PdfShading | ||
shadingReference : PdfIndirectReference [read-only] | PdfShading | ||
writer : PdfWriter [read-only] | PdfShading |
Property | Defined By | ||
---|---|---|---|
_antiAlias : Boolean = false | PdfShading | ||
_bBox : Vector.<Number> | PdfShading | ||
_colorDetails : ColorDetails | PdfShading | ||
_shading : PdfDictionary | PdfShading | ||
_shadingName : PdfName | PdfShading | ||
_shadingReference : PdfIndirectReference | PdfShading | ||
_shadingType : int | PdfShading | ||
_writer : PdfWriter | PdfShading |
Method | Defined By | ||
---|---|---|---|
PdfShading($writer:PdfWriter) | PdfShading | ||
addToBody():void | PdfShading | ||
[static] | PdfShading | ||
complexAxial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, colors:Vector.<RGBColor>, ratios:Vector.<Number>, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading [static]
Create a linear gradient shading with multiple colors ( for 2 colors use simpleAxial )
Example:
var cb: PdfContentByte = document.getDirectContent();
var axial: PdfShading = PdfShading.complexAxial(
writer, 0, 0, 297, 420,
Vector.<RGBColor>([ RGBColor.BLACK, RGBColor.BLUE, RGBColor.CYAN ]),
Vector.<Number>([ 0, 0.5, 1 ] )
);
cb.paintShading( axial );
| PdfShading | ||
complexRadial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, r0:Number, r1:Number, colors:Vector.<RGBColor>, ratios:Vector.<Number>, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading [static]
Create a radial gradient shading with multiple colors ( for 2 colors use simpleRadial )
Example:
var cb: PdfContentByte = document.getDirectContent();
var axial: PdfShading = PdfShading.complexRadial(
writer, 0, 0, 297, 420, 0, 100,
Vector.<RGBColor>([ RGBColor.BLACK, RGBColor.BLUE, RGBColor.CYAN ]),
Vector.<Number>([ 0, 0.5, 1 ] )
);
cb.paintShading( axial );
| PdfShading | ||
getColorArray(color:RGBColor):Vector.<Number> [static] | PdfShading | ||
setName(number:int):void | PdfShading | ||
simpleAxial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, startColor:RGBColor, endColor:RGBColor, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading [static]
Create a liear gradient shading with 2 colors
Example:
var cb: PdfContentByte = document.getDirectContent();
var axial: PdfShading = PdfShading.simpleAxial(
writer, 0, 0, 297, 420,
RGBColor.BLACK, RGBColor.BLUE
);
cb.paintShading( axial );
| PdfShading | ||
simpleRadial(writer:PdfWriter, x0:Number, y0:Number, r0:Number, x1:Number, y1:Number, r1:Number, startColor:RGBColor, endColor:RGBColor, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading [static] | PdfShading | ||
throwColorSpaceErrror():void [static] | PdfShading | ||
type1(writer:PdfWriter, cs:RGBColor, domain:Vector.<Number>, tMatrix:Vector.<Number>, fn:PdfFunction):PdfShading [static] | PdfShading | ||
type2(writer:PdfWriter, cs:RGBColor, coords:Vector.<Number>, domain:Vector.<Number>, fn:PdfFunction, extend:Vector.<Boolean>):PdfShading [static] | PdfShading | ||
type3(writer:PdfWriter, cs:RGBColor, coords:Vector.<Number>, domain:Vector.<Number>, fn:PdfFunction, extend:Vector.<Boolean>):PdfShading [static] | PdfShading |
_antiAlias | property |
protected var _antiAlias:Boolean = false
_bBox | property |
protected var _bBox:Vector.<Number>
_colorDetails | property |
protected var _colorDetails:ColorDetails
_shading | property |
protected var _shading:PdfDictionary
_shadingName | property |
protected var _shadingName:PdfName
_shadingReference | property |
protected var _shadingReference:PdfIndirectReference
_shadingType | property |
protected var _shadingType:int
_writer | property |
protected var _writer:PdfWriter
antiAlias | property |
antiAlias:Boolean
public function get antiAlias():Boolean
public function set antiAlias(value:Boolean):void
bBox | property |
bBox:Vector.<Number>
public function get bBox():Vector.<Number>
public function set bBox(value:Vector.<Number>):void
colorDetails | property |
colorDetails:ColorDetails
[read-only] public function get colorDetails():ColorDetails
colorSpace | property |
colorSpace:RGBColor
public function get colorSpace():RGBColor
public function set colorSpace(value:RGBColor):void
shadingName | property |
shadingReference | property |
shadingReference:PdfIndirectReference
[read-only] public function get shadingReference():PdfIndirectReference
writer | property |
PdfShading | () | Constructor |
addToBody | () | method |
public function addToBody():void
checkCompatibleColors | () | method |
public static function checkCompatibleColors(c1:RGBColor, c2:RGBColor):void
Parameters
c1:RGBColor | |
c2:RGBColor |
complexAxial | () | method |
public static function complexAxial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, colors:Vector.<RGBColor>, ratios:Vector.<Number>, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading
Create a linear gradient shading with multiple colors ( for 2 colors use simpleAxial )
Example:
Parameters
writer:PdfWriter — left side of the color rect bound
| |
x0:Number — top side of the color rect bound
| |
y0:Number — right side of the color rect bound
| |
x1:Number — bottom side of the color rect bound
| |
y1:Number — Vector of RGBColor
| |
colors:Vector.<RGBColor> — Vector of Number. This is the color spread ratios.
If null is passed a default ratio will be created
| |
ratios:Vector.<Number> | |
extendStart:Boolean (default = true )
| |
extendEnd:Boolean (default = true )
|
PdfShading |
ArgumentError if — colors.length ne ratios.length
|
See also
complexRadial | () | method |
public static function complexRadial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, r0:Number, r1:Number, colors:Vector.<RGBColor>, ratios:Vector.<Number>, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading
Create a radial gradient shading with multiple colors ( for 2 colors use simpleRadial )
Example:
Parameters
writer:PdfWriter — left side of the color rect bound
| |
x0:Number — top side of the color rect bound
| |
y0:Number — right side of the color rect bound
| |
x1:Number — bottom side of the color rect bound
| |
y1:Number — Inner radius
| |
r0:Number — Outer radius
| |
r1:Number — Vector of RGBColor
| |
colors:Vector.<RGBColor> — Vector of Number. This is the color spread ratios.
If null is passed a default ratio will be created
| |
ratios:Vector.<Number> | |
extendStart:Boolean (default = true )
| |
extendEnd:Boolean (default = true )
|
PdfShading |
ArgumentError if — colors.length ne ratios.length
|
See also
getColorArray | () | method |
public static function getColorArray(color:RGBColor):Vector.<Number>
Parameters
color:RGBColor |
Vector.<Number> |
setName | () | method |
public function setName(number:int):void
Parameters
number:int |
simpleAxial | () | method |
public static function simpleAxial(writer:PdfWriter, x0:Number, y0:Number, x1:Number, y1:Number, startColor:RGBColor, endColor:RGBColor, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading
Create a liear gradient shading with 2 colors
Example:
Parameters
writer:PdfWriter — left side of the color rect bound
| |
x0:Number — top side of the color rect bound
| |
y0:Number — right side of the color rect bound
| |
x1:Number — bottom side of the color rect bound
| |
y1:Number — gradient start color
| |
startColor:RGBColor — gradient end color
| |
endColor:RGBColor | |
extendStart:Boolean (default = true )
| |
extendEnd:Boolean (default = true )
|
PdfShading |
See also
simpleRadial | () | method |
public static function simpleRadial(writer:PdfWriter, x0:Number, y0:Number, r0:Number, x1:Number, y1:Number, r1:Number, startColor:RGBColor, endColor:RGBColor, extendStart:Boolean = true, extendEnd:Boolean = true):PdfShading
Parameters
writer:PdfWriter | |
x0:Number | |
y0:Number | |
r0:Number | |
x1:Number | |
y1:Number | |
r1:Number | |
startColor:RGBColor | |
endColor:RGBColor | |
extendStart:Boolean (default = true )
| |
extendEnd:Boolean (default = true )
|
PdfShading |
throwColorSpaceErrror | () | method |
public static function throwColorSpaceErrror():void
type1 | () | method |
public static function type1(writer:PdfWriter, cs:RGBColor, domain:Vector.<Number>, tMatrix:Vector.<Number>, fn:PdfFunction):PdfShading
Parameters
writer:PdfWriter | |
cs:RGBColor | |
domain:Vector.<Number> | |
tMatrix:Vector.<Number> | |
fn:PdfFunction |
PdfShading |
type2 | () | method |
public static function type2(writer:PdfWriter, cs:RGBColor, coords:Vector.<Number>, domain:Vector.<Number>, fn:PdfFunction, extend:Vector.<Boolean>):PdfShading
Parameters
writer:PdfWriter | |
cs:RGBColor | |
coords:Vector.<Number> | |
domain:Vector.<Number> | |
fn:PdfFunction | |
extend:Vector.<Boolean> |
PdfShading |
type3 | () | method |
public static function type3(writer:PdfWriter, cs:RGBColor, coords:Vector.<Number>, domain:Vector.<Number>, fn:PdfFunction, extend:Vector.<Boolean>):PdfShading
Parameters
writer:PdfWriter | |
cs:RGBColor | |
coords:Vector.<Number> | |
domain:Vector.<Number> | |
fn:PdfFunction | |
extend:Vector.<Boolean> |
PdfShading |