Packagesekati.draw
Classpublic class Raster

Raster provides utilities for drawing directly into BitmapData objects.



Public Methods
 MethodDefined by
  
Raster Static Constructor
Raster
  
aaCircle(bmp:BitmapData, px:Number, py:Number, r:int, c:Number):void
[static] Draw an anti-aliased circle
Raster
  
aaLine(bmp:BitmapData, x1:int, y1:int, x2:int, y2:int, c:Number):void
[static] Draw an anti-aliased line
Raster
  
circle(bmp:BitmapData, px:int, py:int, r:int, c:Number):void
[static] Draw a circle
Raster
  
cubicBezier(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, x3:int, y3:int, c:Number, resolution:int = 5):void
[static] Draws a Cubic Bezier Curve
Raster
  
filledTri(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number):void
[static] Draw a filled triangle
Raster
  
line(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, c:Number):void
[static] Draw a line
Raster
  
quadBezier(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number, resolution:int = 3):void
[static] Draws a Quadratic Bezier Curve (equivalent to a DisplayObject's graphics#curveTo)
Raster
  
triangle(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number):void
[static] Draw a triangle
Raster
Constructor detail
Raster()constructor
public function Raster()

Raster Static Constructor

Method detail
aaCircle()method
public static function aaCircle(bmp:BitmapData, px:Number, py:Number, r:int, c:Number):void

Draw an anti-aliased circle

Parameters
bmp:BitmapData — bitmap to draw (alpha=true)
 
px:Number — first point x coord
 
py:Number — first point y coord
 
r:int — radius
 
c:Number — color (0xaarrvvbb)
aaLine()method 
public static function aaLine(bmp:BitmapData, x1:int, y1:int, x2:int, y2:int, c:Number):void

Draw an anti-aliased line

Parameters
bmp:BitmapData — bitmap to draw (alpha=true)
 
x1:int — first point x coord
 
y1:int — first point y coord
 
x2:int — second point x coord
 
y2:int — second point y coord
 
c:Number — color (0xaarrvvbb)
circle()method 
public static function circle(bmp:BitmapData, px:int, py:int, r:int, c:Number):void

Draw a circle

Parameters
bmp:BitmapData — bitmap to draw (alpha=true)
 
px:int — first point x coord
 
py:int — first point y coord
 
r:int — radius
 
c:Number — color (0xaarrvvbb)
cubicBezier()method 
public static function cubicBezier(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, x3:int, y3:int, c:Number, resolution:int = 5):void

Draws a Cubic Bezier Curve

Parameters
bmp:BitmapData — BimtapData to draw on (alpha set to true)
 
x0:int — x position of first anchor
 
y0:int — y position of first anchor
 
x1:int — x position of control point
 
y1:int — y position of control point
 
x2:int — x position of second control point
 
y2:int — y position of second control point
 
x3:int — x position of second anchor
 
y3:int — y position of second anchor
 
c:Number — color
 
resolution:int (default = 5) — determines the accuracy of the curve's length (higher number = greater accuracy = longer process)
filledTri()method 
public static function filledTri(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number):void

Draw a filled triangle

Parameters
bmp:BitmapData — Bitmap to draw
 
x0:int — first point x coord
 
y0:int — first point y coord
 
x1:int — second point x coord
 
y1:int — second point y coord
 
x2:int — third point x coord
 
y2:int — third point y coord
 
c:Number — color (0xaarrvvbb)
line()method 
public static function line(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, c:Number):void

Draw a line

Parameters
bmp:BitmapData — bitmap to draw (alpha=true)
 
x0:int — first point x coord
 
y0:int — first point y coord
 
x1:int — second point x coord
 
y1:int — second point y coord
 
c:Number — color (0xaarrvvbb)
quadBezier()method 
public static function quadBezier(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number, resolution:int = 3):void

Draws a Quadratic Bezier Curve (equivalent to a DisplayObject's graphics#curveTo)

Parameters
bmp:BitmapData — BimtapData to draw on (alpha set to true)
 
x0:int — x position of first anchor
 
y0:int — y position of first anchor
 
x1:int — x position of control point
 
y1:int — y position of control point
 
x2:int — x position of second anchor
 
y2:int — y position of second anchor
 
c:Number — color
 
resolution:int (default = 3) — determines the accuracy of the curve's length (higher number = greater accuracy = longer process)
triangle()method 
public static function triangle(bmp:BitmapData, x0:int, y0:int, x1:int, y1:int, x2:int, y2:int, c:Number):void

Draw a triangle

Parameters
bmp:BitmapData — Bitmap to draw
 
x0:int — first point x coord
 
y0:int — first point y coord
 
x1:int — second point x coord
 
y1:int — second point y coord
 
x2:int — third point x coord
 
y2:int — third point y coord
 
c:Number — color (0xaarrvvbb)