Packagecom.flextoolbox.utils
Classpublic class FlexGraphicsUtil

Utility functions for drawing Flex graphical assets (in particular, Halo-style skins).



Public Methods
 MethodDefined by
  
drawBorder(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color1:Number, color2:Number, thickness:Number, alpha:Number):void
[static] Draws a border using a series of rectangular fills.
FlexGraphicsUtil
  
drawDownArrow(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void
[static] Draws an arrow pointing down.
FlexGraphicsUtil
  
drawFill(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void
[static] Draws a rectangular fill.
FlexGraphicsUtil
  
drawUpArrow(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void
[static] Draws an arrow pointing up.
FlexGraphicsUtil
Method detail
drawBorder()method
public static function drawBorder(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color1:Number, color2:Number, thickness:Number, alpha:Number):void

Draws a border using a series of rectangular fills. Should be used instead of a stroke since strokes "bleed" into and out of fills.

Parameters
graphics:Graphics — The Graphics instance to which to draw.
 
x:Number — The starting x position.
 
y:Number — The starting y position.
 
w:Number — The width of the border.
 
h:Number — The height of the border.
 
color1:Number — The color of the top and left sides.
 
color2:Number — The color of the bottom and right sides.
 
thickness:Number — The thickness of the border.
 
alpha:Number — The alpha of the border.
drawDownArrow()method 
public static function drawDownArrow(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void

Draws an arrow pointing down.

Parameters
graphics:Graphics — The Graphics instance to which to draw.
 
x:Number — The starting x position.
 
y:Number — The starting y position.
 
w:Number — The width of the arrow.
 
h:Number — The height of the arrow.
 
color:Number — The color of the arrow.
 
alpha:Number — The transparency of the arrow.
drawFill()method 
public static function drawFill(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void

Draws a rectangular fill.

Parameters
graphics:Graphics — The Graphics instance to which to draw.
 
x:Number — The starting x position.
 
y:Number — The starting y position.
 
w:Number — The width of the fill.
 
h:Number — The height of the fill.
 
color:Number — The color of the fill.
 
alpha:Number — The alpha of the fill.
drawUpArrow()method 
public static function drawUpArrow(graphics:Graphics, x:Number, y:Number, w:Number, h:Number, color:Number, alpha:Number):void

Draws an arrow pointing up.

Parameters
graphics:Graphics — The Graphics instance to which to draw.
 
x:Number — The starting x position.
 
y:Number — The starting y position.
 
w:Number — The width of the arrow.
 
h:Number — The height of the arrow.
 
color:Number — The color of the arrow.
 
alpha:Number — The transparency of the arrow.