Packagecom.kraftner.justlineon.painters
Classpublic class RibbonPainter
InheritanceRibbonPainter Inheritance Painter Inheritance flash.display.Sprite

This Painter draws Ribbons with a wide range of options.



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
  
RibbonPainter(multi:Number, twirl:Boolean, jumpeach:Boolean, min_widthDivisor:Number, max_widthDivisor:Number, maxJumpPerc:Number, border:Boolean, borderWidth:Number)
RibbonPainter
 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
  
The Ribbon concentrates to one point at each end.
RibbonPainter
  
drawStandard(s:Segment):Boolean
For each Palette in this Painter one Ribbon is painted.
RibbonPainter
  
drawStart(s:Segment):Boolean
The Ribbon concentrates to one point at each end.
RibbonPainter
  
init():void
RibbonPainter
Constructor detail
RibbonPainter()constructor
public function RibbonPainter(multi:Number, twirl:Boolean, jumpeach:Boolean, min_widthDivisor:Number, max_widthDivisor:Number, maxJumpPerc:Number, border:Boolean, borderWidth:Number)

Parameters
multi:Number — Multiplicator for the width of the ribbon
 
twirl:Boolean — If true the ribbon twirls
 
jumpeach:Boolean — If true the color of the ribbon changes each Segment of a line
 
min_widthDivisor:Number — The width of the ribbon is relative to the length of the current segment. The minimum size of the ribbon is determined by this value.

Minimum width of ribbon = Length of Segment / this parameter

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

Maximum width of ribbon = Length of Segment / this parameter

 
maxJumpPerc:Number — Maximal allowed difference of the width of the current Segment of the ribbon relative to the previous Segments width in Percent of the previous Segment.
 
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

The Ribbon concentrates to one point at each end.

Parameters
s:Segment

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

For each Palette in this Painter one Ribbon is painted. The width of the complete Ribbon is shared by all Ribbons.

Parameters
s:Segment

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

The Ribbon concentrates to one point at each end.

Parameters
s:Segment

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