Packagecom.kraftner.justlineon.painters
Classpublic class DotPainter
InheritanceDotPainter Inheritance Painter Inheritance flash.display.Sprite

This Painter draws Circles on the line.



Protected Properties
 PropertyDefined by
 Inheritedbitmap : Bitmap
Bitmap in which the drawn graphics are dumped to improve performance.
Painter
 InheritedbitmapData : BitmapData
BitmapData in which the drawn graphics are dumped to improve performance.
Painter
 Inheritedcanvas : Shape
Shape in which the graphics are drawn.
Painter
 Inheritedpalettes : Vector
Stores the palettes this Painter uses
Painter
Public Methods
 MethodDefined by
  
DotPainter(chance:Number, min_widthDivisor:Number, max_widthDivisor:Number, border:Boolean, borderWidth:Number)
DotPainter
 Inherited
addPalette(palette:Palette):void
Adds a Palette to this Painter
Painter
 Inherited
destroy():void
Painter
 Inherited
draw(s:Segment):Boolean
Method that is called by a Lineserver.
Painter
 Inherited
dump():void
Dumps the vector data from canvas to the Bitmap object
Painter
Protected Methods
 MethodDefined by
  
Nothing is drawn at the Start of a Segment.
DotPainter
  
drawStandard(s:Segment):Boolean
Dot-drawing method
DotPainter
  
drawStart(s:Segment):Boolean
Nothing is drawn at the End of a Segment but the current color of the palettes is changed.
DotPainter
  
init():void
DotPainter
Constructor detail
DotPainter()constructor
public function DotPainter(chance:Number, min_widthDivisor:Number, max_widthDivisor:Number, border:Boolean, borderWidth:Number)

Parameters
chance:Number — Chance that circle(s) is drawn. This Chance is represented by a Number between 0 and 1, 0 meaning that the circle(s) will never be drawn and 1 meaning it/they is/are always drawn.
 
min_widthDivisor:Number — The size of the circle(s) is relative to the length of the current segment. The minimum size of the circle(s) is determined by this value.

Minimum width of circle(s) = Length of Segment / this parameter

 
max_widthDivisor:Number — The size of the circle(s) is relative to the length of the current segment. The maximum size of the circle(s) is determined by this value.

Maximum width of circle(s) = Length of Segment / this parameter

 
border:Boolean — If true outlines are drawn. The first Color of the Palette of this Painter is used for the outline and therefore it isn't used for further drawing.
 
borderWidth:Number — Width of the outlines. Only used if border is true.
Method detail
drawPrevStart()method
protected override function drawPrevStart(s:Segment):Boolean

Nothing is drawn at the Start of a Segment.

Parameters
s:Segment

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

Dot-drawing method

Parameters
s:Segment

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

Nothing is drawn at the End of a Segment but the current color of the palettes is changed.

Parameters
s:Segment

Returns
Boolean
init()method 
protected override function init():void