Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Character

Represents a styled character

Hierarchy

  • Shape
    • Character

Index

Constructors

constructor

  • new Character(character: string, style: {}, index?: number): Character
  • Parameters

    • character: string
    • style: {}
    • Default value index: number = null

    Returns Character

Properties

_font

_font: Font

_glyph

_glyph: Glyph

alpha

alpha: number

bitmapCache

bitmapCache: BitmapCache

cacheCanvas

cacheCanvas: HTMLCanvasElement | Object

cacheID

cacheID: number

character

character: string = ""

characterCase

characterCase: Case = null

characterCaseOffset

characterCaseOffset: number = 0

characterCode

characterCode: number = null

compositeOperation

compositeOperation: string

cursor

cursor: string

fillColor

fillColor: string = null

filters

filters: Filter[]

font

font: string = null

graphics

graphics: Graphics

hPosition

hPosition: number = null

hitArea

hitArea: DisplayObject

id

id: number

index

index: number = null

mask

mask: Shape

measuredHeight

measuredHeight: number = null

measuredWidth

measuredWidth: number = null

missing

missing: boolean = false

mouseEnabled

mouseEnabled: boolean

name

name: string

parent

parent: Container

regX

regX: number

regY

regY: number

rotation

rotation: number

scaleX

scaleX: number

scaleY

scaleY: number

shadow

shadow: Shadow

size

size: number = null

skewX

skewX: number

skewY

skewY: number

snapToPixel

snapToPixel: boolean

stage

stage: Stage

strokeColor

strokeColor: string = null

strokeWidth

strokeWidth: number = null

tickEnabled

tickEnabled: boolean

tracking

tracking: number = null

transformMatrix

transformMatrix: Matrix2D

visible

visible: boolean

x

x: number

y

y: number

Static suppressCrossDomainErrors

suppressCrossDomainErrors: boolean

Methods

addEventListener

  • addEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): Function
  • addEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): Function
  • addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean }, useCapture?: boolean): Object
  • addEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void }, useCapture?: boolean): Object
  • Parameters

    • type: string
    • listener: (eventObj: Object) => boolean
        • (eventObj: Object): boolean
        • Parameters

          • eventObj: Object

          Returns boolean

    • Optional useCapture: boolean

    Returns Function

  • Parameters

    • type: string
    • listener: (eventObj: Object) => void
        • (eventObj: Object): void
        • Parameters

          • eventObj: Object

          Returns void

    • Optional useCapture: boolean

    Returns Function

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => boolean }
      • handleEvent: (eventObj: Object) => boolean
          • (eventObj: Object): boolean
          • Parameters

            • eventObj: Object

            Returns boolean

    • Optional useCapture: boolean

    Returns Object

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => void }
      • handleEvent: (eventObj: Object) => void
          • (eventObj: Object): void
          • Parameters

            • eventObj: Object

            Returns void

    • Optional useCapture: boolean

    Returns Object

cache

  • cache(x: number, y: number, width: number, height: number, scale?: number): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number
    • Optional scale: number

    Returns void

clone

  • clone(recursive?: boolean): Shape
  • Parameters

    • Optional recursive: boolean

    Returns Shape

dispatchEvent

  • dispatchEvent(eventObj: Object, target?: Object): boolean
  • dispatchEvent(eventObj: string, target?: Object): boolean
  • dispatchEvent(eventObj: Event, target?: Object): boolean
  • Parameters

    • eventObj: Object
    • Optional target: Object

    Returns boolean

  • Parameters

    • eventObj: string
    • Optional target: Object

    Returns boolean

  • Parameters

    • eventObj: Event
    • Optional target: Object

    Returns boolean

draw

  • draw(ctx: CanvasRenderingContext2D): boolean

getBounds

  • getBounds(): Rectangle
  • Returns Rectangle

getCacheDataURL

  • getCacheDataURL(): string

getConcatenatedDisplayProps

  • getConcatenatedDisplayProps(props?: DisplayProps): DisplayProps

getConcatenatedMatrix

  • getConcatenatedMatrix(mtx?: Matrix2D): Matrix2D
  • Parameters

    • Optional mtx: Matrix2D

    Returns Matrix2D

getMatrix

  • getMatrix(matrix?: Matrix2D): Matrix2D
  • Parameters

    • Optional matrix: Matrix2D

    Returns Matrix2D

getStage

  • getStage(): Stage
  • deprecated

    Returns Stage

getTransformedBounds

  • getTransformedBounds(): Rectangle

getWidth

  • getWidth(): number

globalToLocal

  • globalToLocal(x: number, y: number, pt?: Point | Object): Point
  • Parameters

    • x: number
    • y: number
    • Optional pt: Point | Object

    Returns Point

hasEventListener

  • hasEventListener(type: string): boolean
  • Parameters

    • type: string

    Returns boolean

hitTest

  • hitTest(x: number, y: number): boolean
  • Parameters

    • x: number
    • y: number

    Returns boolean

isVisible

  • isVisible(): boolean
  • Returns boolean

localToGlobal

  • localToGlobal(x: number, y: number, pt?: Point | Object): Point
  • Parameters

    • x: number
    • y: number
    • Optional pt: Point | Object

    Returns Point

localToLocal

  • localToLocal(x: number, y: number, target: DisplayObject, pt?: Point | Object): Point
  • Parameters

    • x: number
    • y: number
    • target: DisplayObject
    • Optional pt: Point | Object

    Returns Point

off

  • off(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void
  • off(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void
  • off(type: string, listener: { handleEvent: (eventObj: Object) => boolean }, useCapture?: boolean): void
  • off(type: string, listener: { handleEvent: (eventObj: Object) => void }, useCapture?: boolean): void
  • off(type: string, listener: Function, useCapture?: boolean): void
  • Parameters

    • type: string
    • listener: (eventObj: Object) => boolean
        • (eventObj: Object): boolean
        • Parameters

          • eventObj: Object

          Returns boolean

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: (eventObj: Object) => void
        • (eventObj: Object): void
        • Parameters

          • eventObj: Object

          Returns void

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => boolean }
      • handleEvent: (eventObj: Object) => boolean
          • (eventObj: Object): boolean
          • Parameters

            • eventObj: Object

            Returns boolean

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => void }
      • handleEvent: (eventObj: Object) => void
          • (eventObj: Object): void
          • Parameters

            • eventObj: Object

            Returns void

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: Function
    • Optional useCapture: boolean

    Returns void

on

  • on(type: string, listener: (eventObj: Object) => boolean, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function
  • on(type: string, listener: (eventObj: Object) => void, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Function
  • on(type: string, listener: { handleEvent: (eventObj: Object) => boolean }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object
  • on(type: string, listener: { handleEvent: (eventObj: Object) => void }, scope?: Object, once?: boolean, data?: any, useCapture?: boolean): Object
  • Parameters

    • type: string
    • listener: (eventObj: Object) => boolean
        • (eventObj: Object): boolean
        • Parameters

          • eventObj: Object

          Returns boolean

    • Optional scope: Object
    • Optional once: boolean
    • Optional data: any
    • Optional useCapture: boolean

    Returns Function

  • Parameters

    • type: string
    • listener: (eventObj: Object) => void
        • (eventObj: Object): void
        • Parameters

          • eventObj: Object

          Returns void

    • Optional scope: Object
    • Optional once: boolean
    • Optional data: any
    • Optional useCapture: boolean

    Returns Function

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => boolean }
      • handleEvent: (eventObj: Object) => boolean
          • (eventObj: Object): boolean
          • Parameters

            • eventObj: Object

            Returns boolean

    • Optional scope: Object
    • Optional once: boolean
    • Optional data: any
    • Optional useCapture: boolean

    Returns Object

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => void }
      • handleEvent: (eventObj: Object) => void
          • (eventObj: Object): void
          • Parameters

            • eventObj: Object

            Returns void

    • Optional scope: Object
    • Optional once: boolean
    • Optional data: any
    • Optional useCapture: boolean

    Returns Object

removeAllEventListeners

  • removeAllEventListeners(type?: string): void

removeEventListener

  • removeEventListener(type: string, listener: (eventObj: Object) => boolean, useCapture?: boolean): void
  • removeEventListener(type: string, listener: (eventObj: Object) => void, useCapture?: boolean): void
  • removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => boolean }, useCapture?: boolean): void
  • removeEventListener(type: string, listener: { handleEvent: (eventObj: Object) => void }, useCapture?: boolean): void
  • removeEventListener(type: string, listener: Function, useCapture?: boolean): void
  • Parameters

    • type: string
    • listener: (eventObj: Object) => boolean
        • (eventObj: Object): boolean
        • Parameters

          • eventObj: Object

          Returns boolean

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: (eventObj: Object) => void
        • (eventObj: Object): void
        • Parameters

          • eventObj: Object

          Returns void

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => boolean }
      • handleEvent: (eventObj: Object) => boolean
          • (eventObj: Object): boolean
          • Parameters

            • eventObj: Object

            Returns boolean

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: { handleEvent: (eventObj: Object) => void }
      • handleEvent: (eventObj: Object) => void
          • (eventObj: Object): void
          • Parameters

            • eventObj: Object

            Returns void

    • Optional useCapture: boolean

    Returns void

  • Parameters

    • type: string
    • listener: Function
    • Optional useCapture: boolean

    Returns void

set

  • set(props: Object): Shape
  • Parameters

    • props: Object

    Returns Shape

setBounds

  • setBounds(x: number, y: number, width: number, height: number): void
  • Parameters

    • x: number
    • y: number
    • width: number
    • height: number

    Returns void

setGlyph

  • setGlyph(glyph: Glyph): void

setTransform

  • setTransform(x?: number, y?: number, scaleX?: number, scaleY?: number, rotation?: number, skewX?: number, skewY?: number, regX?: number, regY?: number): Shape
  • Parameters

    • Optional x: number
    • Optional y: number
    • Optional scaleX: number
    • Optional scaleY: number
    • Optional rotation: number
    • Optional skewX: number
    • Optional skewY: number
    • Optional regX: number
    • Optional regY: number

    Returns Shape

toString

  • toString(): string
  • Returns string

trackingOffset

  • trackingOffset(): number

uncache

  • uncache(): void
  • Returns void

updateCache

  • updateCache(compositeOperation?: string): void
  • Parameters

    • Optional compositeOperation: string

    Returns void

updateContext

  • updateContext(ctx: CanvasRenderingContext2D): void
  • Parameters

    • ctx: CanvasRenderingContext2D

    Returns void

willTrigger

  • willTrigger(type: string): boolean
  • Parameters

    • type: string

    Returns boolean

Static initialize

  • initialize(target: Object): void
  • Parameters

    • target: Object

    Returns void

Generated using TypeDoc