Packageio.github.ycabon.markings.lineClasses
Classpublic class DashedLinePart
InheritanceDashedLinePart Inheritance flash.events.EventDispatcher
Implements ILinePart

The DashedLinePart can be used as a part of an AdvancedLineSymbol.

This part draws the line using blank gaps and strokes from the Flex SDK:

  ...
  <mk:AdvancedLineSymbol>
      <s:ArrayList>
          <mk:DashedLinePart pattern"[10, 5]">
              <s:SolidColorStroke alpha="1"
                                  color="0xDD0000"
                                  weight="6"/>
          </mk:SolidLinePart>
      </s:ArrayList>
  </mk:AdvancedLineSymbol>
  ...
  

MXML SyntaxexpandedHide MXML Syntax

The <mk:DashedLinePart> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mk:DashedLinePart
    Properties
    stroke="null"
    xOffset="0"
    yOffset="0"
    pattern="[5, 5]"
    inverse="false"
  />
  

Default MXML Propertystroke

See also

mx.graphics.SolidColorStroke
mx.graphics.LinearGradientStroke
mx.graphics.RadialGradientStroke


Public Properties
 PropertyDefined By
  inverse : Boolean
Indicates if the pattern begin by a dash or by a gap.
DashedLinePart
  pattern : Array
The pattern used to draw dashes, in pixels.
DashedLinePart
  stroke : IStroke
The stroke used by this part.
DashedLinePart
  xOffset : int
The offset on the x-axis in pixel to apply to the projected line.
DashedLinePart
  yOffset : int
The offset on the y-axis in pixel to apply to the projected line.
DashedLinePart
Public Methods
 MethodDefined By
  
DashedLinePart(stroke:IStroke = null, xOffset:int = 0, yOffset:int = 0, pattern:Array = null, inverse:Boolean = false)
Constructor.
DashedLinePart
Events
 Event Summary Defined By
  Dispatched when the value of the part changes as a result of its properties modifications.DashedLinePart
Property Detail
inverseproperty
inverse:Boolean

Indicates if the pattern begin by a dash or by a gap.

The default value is false, which means that the pattern begins by a dash.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get inverse():Boolean
    public function set inverse(value:Boolean):void

See also

patternproperty 
pattern:Array

The pattern used to draw dashes, in pixels.

The part draw the first value in pixels, then apply a gap of the length of the second value, and so on. This behavior can be changed using the inverse property.

The default value is [5, 5].

The default value is [5, 5].

This property can be used as the source for data binding.


Implementation
    public function get pattern():Array
    public function set pattern(value:Array):void

See also

strokeproperty 
stroke:IStroke

The stroke used by this part.

This property can be used as the source for data binding.


Implementation
    public function get stroke():IStroke
    public function set stroke(value:IStroke):void
xOffsetproperty 
xOffset:int

The offset on the x-axis in pixel to apply to the projected line.

This property can be used as the source for data binding.


Implementation
    public function get xOffset():int
    public function set xOffset(value:int):void
yOffsetproperty 
yOffset:int

The offset on the y-axis in pixel to apply to the projected line.

This property can be used as the source for data binding.


Implementation
    public function get yOffset():int
    public function set yOffset(value:int):void
Constructor Detail
DashedLinePart()Constructor
public function DashedLinePart(stroke:IStroke = null, xOffset:int = 0, yOffset:int = 0, pattern:Array = null, inverse:Boolean = false)

Constructor.

Parameters
stroke:IStroke (default = null) — The stroke used by this part.
 
xOffset:int (default = 0) — The offset on the x-axis in pixel to apply to the projected line.
 
yOffset:int (default = 0) — The offset on the y-axis in pixel to apply to the projected line.
 
pattern:Array (default = null) — The pattern used to draw dashes, in pixels.
 
inverse:Boolean (default = false) — if true the pattern begin by a gap.
Event Detail
change Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.CHANGE

Dispatched when the value of the part changes as a result of its properties modifications.