Packagecom.kraftner.justlineon.painters
Classpublic class EndpointPainter
InheritanceEndpointPainter Inheritance Painter Inheritance flash.display.Sprite

This Painter draws basic geometric shapes at the end of each 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
  
EndpointPainter(form:Number, chance:Number, min_widthDivisor:Number, max_widthDivisor:Number, border:Boolean, borderWidth:Number)
EndpointPainter
 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.
EndpointPainter
  
drawStandard(s:Segment):Boolean
Nothing is drawn for normal Segments.
EndpointPainter
  
drawStart(s:Segment):Boolean
Drawing Routine
EndpointPainter
  
init():void
EndpointPainter
Constructor detail
EndpointPainter()constructor
public function EndpointPainter(form:Number, chance:Number, min_widthDivisor:Number, max_widthDivisor:Number, border:Boolean, borderWidth:Number)

Parameters
form:Number — 0 draws circles, 1 draws squares
 
chance:Number — Chance that something is drawn. This Chance is represented by a Number between 0 and 1, 0 meaning that there's always something drawn and 1 meaning nothing is ever drawn.
 
min_widthDivisor:Number — The size of what is drawn relative to the length of the current segment. The minimum size is determined by this value.

Minimum width = Length of Segment / this parameter

 
max_widthDivisor:Number — The size of what is drawn relative to the length of the current segment. The maximum size is determined by this value.

Maximum width = 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

Nothing is drawn for normal Segments.

Parameters
s:Segment

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

Drawing Routine

Parameters
s:Segment

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