Packagecom.kraftner.justlineon.painters
Classpublic class Painter
InheritancePainter Inheritance flash.display.Sprite
SubclassesDotPainter, EndpointPainter, RibbonPainter

Template for all kinds of Painters

This Class defines the base functionality of all Painters. It only draws a grey line for each Segment. Therefore this Painter is ideal for debugging.



Protected Properties
 PropertyDefined by
  bitmap : Bitmap
Bitmap in which the drawn graphics are dumped to improve performance.
Painter
  bitmapData : BitmapData
BitmapData in which the drawn graphics are dumped to improve performance.
Painter
  canvas : Shape
Shape in which the graphics are drawn.
Painter
  palettes : Vector
Stores the palettes this Painter uses
Painter
Public Methods
 MethodDefined by
  
Constructor method
Painter
  
addPalette(palette:Palette):void
Adds a Palette to this Painter
Painter
  
destroy():void
Painter
  
draw(s:Segment):Boolean
Method that is called by a Lineserver.
Painter
  
dump():void
Dumps the vector data from canvas to the Bitmap object
Painter
Protected Methods
 MethodDefined by
  
Method being called when the previous Segment was a start-Segment
Painter
  
drawStandard(s:Segment):Boolean
Method that handles a normal Segment
Painter
  
drawStart(s:Segment):Boolean
Method being called when the current Segment is a start-Segment
Painter
  
init():void
Method that is called once when the Painter is instantiated.
Painter
Property detail
bitmapproperty
protected var bitmap:Bitmap

Bitmap in which the drawn graphics are dumped to improve performance.

bitmapDataproperty 
protected var bitmapData:BitmapData

BitmapData in which the drawn graphics are dumped to improve performance.

canvasproperty 
protected var canvas:Shape

Shape in which the graphics are drawn.

palettesproperty 
protected var palettes:Vector

Stores the palettes this Painter uses

Constructor detail
Painter()constructor
public function Painter()

Constructor method

Method detail
addPalette()method
public function addPalette(palette:Palette):void

Adds a Palette to this Painter

Parameters
palette:Palette — Palette to add to this Painter

See also

destroy()method 
public function destroy():void
draw()method 
public function draw(s:Segment):Boolean

Method that is called by a Lineserver. In most cases you don't need to overwrite this in subclasses. Use drawStart, drawPrevStart and drawStandard instead.

Parameters
s:Segment

Returns
Boolean

See also

drawPrevStart()method 
protected function drawPrevStart(s:Segment):Boolean

Method being called when the previous Segment was a start-Segment

Parameters
s:Segment

Returns
Boolean

See also

drawStandard()method 
protected function drawStandard(s:Segment):Boolean

Method that handles a normal Segment

Parameters
s:Segment

Returns
Boolean

See also

drawStart()method 
protected function drawStart(s:Segment):Boolean

Method being called when the current Segment is a start-Segment

Parameters
s:Segment

Returns
Boolean

See also

dump()method 
public function dump():void

Dumps the vector data from canvas to the Bitmap object

See also

init()method 
protected function init():void

Method that is called once when the Painter is instantiated. You may overwrite it in subclasses.