Packagecom.rubenswieringa.book
Classpublic class Gradients

Draws shadows and highlights for a Page.

See also

Page


Public Properties
 PropertyDefined by
  eliminateSolidHighlights : Boolean = true
If true, highlights for the insides of hardcover Pages are not drawn.
Gradients
  page : Page
[read-only] Page this Gradients instance is associated with.
Gradients
  solidColorAlpha : Number
The maximum alpha value for solid shadows or highlights on Pages.
Gradients
Public Methods
 MethodDefined by
  
Constructor.
Gradients
  
drawFlipside(graphics:Graphics, area:Array, tint:String, rotate:Number):void
Draws a gradient to simulate depth on the flipside of the Page.
Gradients
  
drawFold(graphics:Graphics, tint:String, rotate:Number):void
Draws a gradient to simulate depth in the middle of the Book.
Gradients
  
drawInside(graphics:Graphics, area:Array, tint:String, rotate:Number):void
Draws a gradient to simulate a shadow on the facing pages of the Book.
Gradients
  
drawOutside(graphics:Graphics, area:Array, tint:String, rotate:Number):void
Draws a gradient to simulate a shadow on the next page of the Book.
Gradients
Public Constants
 ConstantDefined by
  DARK : String = "dark"
[static]
Gradients
  LIGHT : String = "light"
[static]
Gradients
  ROTATE_FULL : Number = 0.25
[static]
Gradients
  ROTATE_HALF : Number = 0.75
[static]
Gradients
Property detail
eliminateSolidHighlightsproperty
public var eliminateSolidHighlights:Boolean = true

If true, highlights for the insides of hardcover Pages are not drawn.

The default value is true.

pageproperty 
page:Page  [read-only]

Page this Gradients instance is associated with.

Implementation
    public function get page():Page

See also

solidColorAlphaproperty 
solidColorAlpha:Number  [read-write]

The maximum alpha value for solid shadows or highlights on Pages.

The default value is 0.3.

Implementation
    public function get solidColorAlpha():Number
    public function set solidColorAlpha(value:Number):void
Constructor detail
Gradients()constructor
public function Gradients(p:Page)

Constructor.

Parameters
p:Page
Method detail
drawFlipside()method
public function drawFlipside(graphics:Graphics, area:Array, tint:String, rotate:Number):void

Draws a gradient to simulate depth on the flipside of the Page.

Parameters
graphics:Graphics — Array with coordinates (Point instances), typically the cPoints property of the ocf Object returned by the computeFlip method of the PageFlip class
 
area:Array — Indicates whether to draw a highlight (Gradients.LIGHT) or shadow (Gradients.DARK)
 
tint:String — The correction of the gradient its rotation (from 0.0 to 1.0)
 
rotate:Number

See also

drawFold()method 
public function drawFold(graphics:Graphics, tint:String, rotate:Number):void

Draws a gradient to simulate depth in the middle of the Book.

Parameters
graphics:Graphics — Indicates whether to draw a highlight (Gradients.LIGHT) or shadow (Gradients.DARK)
 
tint:String
 
rotate:Number

See also

drawInside()method 
public function drawInside(graphics:Graphics, area:Array, tint:String, rotate:Number):void

Draws a gradient to simulate a shadow on the facing pages of the Book.

Parameters
graphics:Graphics — Array with coordinates (Point instances), typically the cPoints property of the ocf Object returned by the computeFlip method of the PageFlip class
 
area:Array — Indicates whether to draw a light or dark shadow
 
tint:String — The correction of the gradient its rotation (from 0.0 to 1.0)
 
rotate:Number

See also

drawOutside()method 
public function drawOutside(graphics:Graphics, area:Array, tint:String, rotate:Number):void

Draws a gradient to simulate a shadow on the next page of the Book.

Parameters
graphics:Graphics — Array with coordinates (Point instances), typically the pPoints property of the ocf Object returned by the computeFlip method of the PageFlip class
 
area:Array — Indicates whether to draw a light or dark shadow
 
tint:String — The correction of the gradient its rotation (from 0.0 to 1.0)
 
rotate:Number

See also

Constant detail
DARKconstant
public static const DARK:String = "dark"
LIGHTconstant 
public static const LIGHT:String = "light"
ROTATE_FULLconstant 
public static const ROTATE_FULL:Number = 0.25
ROTATE_HALFconstant 
public static const ROTATE_HALF:Number = 0.75