TransformerHandle

class TransformerHandle extends PIXI.Graphics

The transfomer handle base implementation.

Constructor


new TransformerHandle(transformer: Transformer, handle: string, styleOpts: object, handler: Function, commit: Function, cursor: string) → {}
Parameters:
Name Type Attributes Default Description
transformer Transformer
handle string

the type of handle being drawn

styleOpts object

styling options passed by the user

handler Function

handler for drag events, it receives the pointer position; used by onDrag.

commit Function

handler for drag-end events.

cursor string

<optional>

'move'

a custom cursor to be applied on this handle

Summary


Properties from TransformerHandle

boolean
_dirty = true

This flags whether this handle should be redrawn in the next frame due to style changes.

Partial<ITransformerHandleStyle>
style

The currently applied handle style.

Transformer
protected transformer

Methods from TransformerHandle

void
protected draw()

Redraws the handle's geometry. This is called on a render if this._dirty is true.

void
protected onDrag(e: PIXI.InteractionEvent)

Called on a pointermove when this._pointerDown & this._pointerDragging.

void
protected onDragEnd(_: PIXI.InteractionEvent)

Called on a pointerup or pointerupoutside & this._pointerDragging was true.

void
protected onDragStart(e: PIXI.InteractionEvent)

Called on the first pointermove when this._pointerDown is true. You must call the super implementation.

void
protected onPointerDown(e: PIXI.InteractionEvent)

Handles the pointerdown event. You must call the super implementation.

void
protected onPointerMove(e: PIXI.InteractionEvent)

Handles the pointermove event. You must call the super implementation.

void
protected onPointerUp(e: PIXI.InteractionEvent)

Handles the pointerup event. You must call the super implementation.

Properties inherited from Graphics

PIXI.BLEND_MODES
blendMode = PIXI.BLEND_MODES.NORMAL
boolean
cacheAsBitmap = false
PIXI.Polygon
currentPath = undefined
PIXI.FillStyle
fill
PIXI.GraphicsGeometry
geometry
PIXI.LineStyle
line
string
pluginName = "batch"

Renderer plugin for batching

PIXI.Shader
shader = undefined
number
tint = 0xFFFFFF
PIXI.FillStyle
protected _fillStyle

Current fill style.

boolean
protected _holeMode = false

Current hole mode is enabled.

PIXI.LineStyle
protected _lineStyle

Current line style.

PIXI.Matrix
protected _matrix = undefined

Current shape transform matrix.

number
protected batchDirty = -1

Update dirty for limiting calculating batches.

Array<IGraphicsBatchElement>
protected batches

A collections of batches! These can be drawn by the renderer batch system.

number
protected batchTint = -1

Update dirty for limiting calculating tints for batches.

Float32Array
protected vertexData = undefined

Copy of the object vertex data.

Properties inherited from Container

T[]
children
number
height

The height of the Container, setting this will actually modify the scale to achieve the value set.

boolean
interactiveChildren = true
boolean
sortableChildren
boolean
sortDirty

Should children be sorted by zIndex at the next updateTransform call.

number
width

The width of the Container, setting this will actually modify the scale to achieve the value set.

Properties inherited from DisplayObject

boolean
_accessibleActive = false
boolean
_accessibleDiv = undefined
PIXI.Bounds
_bounds

The bounds object, this is used to calculate and store the bounds of the displayObject.

PIXI.Bounds
_localBounds

Local bounds object, swapped with _bounds when using getLocalBounds().

boolean
accessible = false
boolean
accessibleChildren = true
string
accessibleHint = undefined
string
accessiblePointerEvents = 'auto'
?string
accessibleTitle = undefined
string
accessibleType = 'button'
number
alpha

The opacity of the object.

number
angle
boolean
buttonMode
number
cacheAsBitmapMultisample = PIXI.MSAA_QUALITY.NONE
number
cacheAsBitmapResolution = null
boolean
cullable

Should this object be rendered if the bounds of this object are out of frame?

PIXI.Rectangle
cullArea
string
cursor = undefined
boolean
destroyed

Readonly flag for destroyed display objects.

PIXI.Rectangle
filterArea
PIXI.Filter[] | null
filters
PIXI.IHitArea
hitArea = undefined
boolean
interactive = false
boolean
isMask

Does any other displayObject use this object as a mask?

boolean
isSprite

Used to fast check if a sprite is.. a sprite!

PIXI.Matrix
localTransform
PIXI.Container | PIXI.MaskData | null
mask
string
name = undefined
PIXI.Container
parent

The display object container that contains this display object.

PIXI.ObservablePoint
pivot
PIXI.ObservablePoint
position
boolean
renderable
number
rotation
PIXI.ObservablePoint
scale

The scale factors of this object along the local coordinate axes.

PIXI.ObservablePoint
skew
PIXI.DisplayObject
smartMask = undefined
PIXI.Transform
transform
boolean
visible
number
worldAlpha
PIXI.Matrix
worldTransform
boolean
worldVisible
number
x
number
y
number
zIndex

The zIndex of the displayObject.

number
protected _boundsID

Flags the cached bounds as dirty.

PIXI.Rectangle
protected _boundsRect

Cache of this display-object's bounds-rectangle.

boolean
protected _destroyed

If the object has been destroyed via destroy(). If true, it should not be used.

PIXI.Filter[]
protected _enabledFilters
number
protected _lastSortedIndex
PIXI.Rectangle
protected _localBoundsRect

Cache of this display-object's local-bounds rectangle.

PIXI.Container | PIXI.MaskData
protected _mask
PIXI.Container
protected _tempDisplayObjectParent
number
protected _zIndex

Methods inherited from Graphics

this
arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean)
this
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number)

The arcTo() method creates an arc/curve between two tangents on the canvas.

this
beginFill(color: number, alpha: number)
this
beginHole()
PIXI.Graphics
beginTextureFill(options: IFillStyleOptions)
this
bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number)
this
clear()
PIXI.Graphics
clone()
this
closePath()
boolean
containsPoint(point: IPointData)
void
destroy(options: IDestroyOptions | boolean)
PIXI.Graphics
drawChamferRect(this: PIXI.Graphics, x: number, y: number, width: number, height: number, chamfer: number)

Draw Rectangle with chamfer corners. These are angled corners.

this
drawCircle(x: number, y: number, radius: number)
this
drawEllipse(x: number, y: number, width: number, height: number)
PIXI.Graphics
drawFilletRect(this: PIXI.Graphics, x: number, y: number, width: number, height: number, fillet: number)
this
drawPolygon(path: Array<number> | Array<PIXI.IPointData> | PIXI.Polygon)
this
drawRect(x: number, y: number, width: number, height: number)
PIXI.Graphics
drawRegularPolygon(this: PIXI.Graphics, x: number, y: number, radius: number, sides: number, rotation: number)

Draw a regular polygon where all sides are the same length.

PIXI.Graphics
drawRoundedPolygon(this: PIXI.Graphics, x: number, y: number, radius: number, sides: number, corner: number, rotation: number)

Draw a regular polygon with rounded corners.

this
drawRoundedRect(x: number, y: number, width: number, height: number, radius: number)
this
drawShape(shape: PIXI.Circle | PIXI.Ellipse | PIXI.Polygon | PIXI.Rectangle | PIXI.RoundedRectangle)
PIXI.Graphics
drawStar(this: PIXI.Graphics, x: number, y: number, points: number, radius: number, innerRadius: number, rotation: number)

Draw a star shape with an arbitrary number of points.

PIXI.Graphics
drawTorus(this: PIXI.Graphics, x: number, y: number, innerRadius: number, outerRadius: number, startArc: number, endArc: number)

Draw a torus shape, like a donut. Can be used for something like a circle loader.

this
endFill()
this
endHole()
PIXI.Texture
generateCanvasTexture(scaleMode: PIXI.SCALE_MODES, resolution: number)
boolean
isFastRect()
this
lineStyle(width: ILineStyleOptions | number, color: number, alpha: number, alignment: number, native: boolean)
PIXI.Graphics
lineStyle(options: ILineStyleOptions)
PIXI.Graphics
lineTextureStyle(options: ILineStyleOptions)
this
lineTo(x: number, y: number)
this
moveTo(x: number, y: number)
this
quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number)
this
setMatrix(matrix: PIXI.Matrix)
void
protected _calculateBounds()

Retrieves the bounds of the graphic shape as a rectangle object.

void
protected _initCurve(x: number, y: number)
void
protected _populateBatches()

Populating batches for rendering.

void
protected _render(renderer: PIXI.Renderer)
void
protected _renderBatched(renderer: PIXI.Renderer)
void
protected _renderDirect(renderer: PIXI.Renderer)
void
protected _renderDrawCallDirect(renderer: PIXI.Renderer, drawCall: PIXI.BatchDrawCall)
PIXI.Shader
protected _resolveDirectShader(renderer: PIXI.Renderer)
void
protected calculateTints()

Recalculate the tint by applying tint to batches using Graphics tint.

void
protected calculateVertices()

If there's a transform update or a change to the shape of the geometry, recalculate the vertices.

void
protected finishPoly()
void
protected startPoly()

Methods inherited from Container

PIXI.DisplayObject
addChild(children: PIXI.DisplayObject)

Adds one or more children to the container.

PIXI.DisplayObject
addChildAt(child: PIXI.DisplayObject, index: number)
void
calculateBounds()

Recalculates the bounds of the container.

containerUpdateTransform()
T
getChildAt(index: number)
PIXI.DisplayObject
getChildByName(name: string, deep: boolean)

Returns the display object in the container.

number
getChildIndex(child: T)
PIXI.Rectangle
getLocalBounds(rect: PIXI.Rectangle, skipChildrenUpdate: boolean)

Retrieves the local bounds of the displayObject as a rectangle object.

PIXI.DisplayObject
removeChild(children: PIXI.DisplayObject)
T
removeChildAt(index: number)
T[]
removeChildren(beginIndex: number, endIndex)
void
render(renderer: PIXI.Renderer)

Renders the object using the WebGL renderer.

void
renderCanvas(renderer: PIXI.CanvasRenderer)
void
setChildIndex(child: T, index: number)
void
sortChildren()

Sorts children by zIndex. Previous order is maintained for 2 children with the same zIndex.

void
swapChildren(child: T, child2: T)
void
updateTransform()

Updates the transform on all children of this container for rendering.

void
protected _renderWithCulling(renderer: PIXI.Renderer)
void
protected onChildrenChange(_length: number)
void
protected renderAdvanced(renderer: PIXI.Renderer)

Inherited Events from Container

Inherited Events from DisplayObject

added
childRemoved
click
clickcapture

Capture phase equivalent of click.

destroyed
mousedown
mousedowncapture

Capture phase equivalent of mousedown.

mouseenter

Fired when the mouse pointer is moved over a DisplayObject and its descendant's hit testing boundaries.

mouseentercapture

Capture phase equivalent of mouseenter

mouseleave

Fired when the mouse pointer exits a DisplayObject and its descendants.

mouseleavecapture

Capture phase equivalent of mouseleave.

mousemove
mousemovecature

Capture phase equivalent of mousemove.

mouseout
mouseoutcapture

Capture phase equivalent of mouseout.

mouseover
mouseovercapture

Capture phase equivalent of mouseover.

mouseup
mouseupcature

Capture phase equivalent of mouseup.

mouseupoutside
mouseupoutsidecapture

Capture phase equivalent of mouseupoutside.

pointercancel
pointercancelcapture

Capture phase equivalent of pointercancel.

pointerdown
pointerdowncapture

Capture phase equivalent of pointerdown.

pointerenter

Fired when the pointer is moved over a DisplayObject and its descendant's hit testing boundaries.

pointerentercapture

Capture phase equivalent of pointerenter

pointerleave

Fired when the pointer leaves the hit testing boundaries of a DisplayObject and its descendants.

pointerleavecapture

Capture phase equivalent of pointerleave.

pointermove
pointermovecapture

Capture phase equivalent of pointermove.

pointerout
pointeroutcapture

Capture phase equivalent of pointerout.

pointerover
pointerovercapture

Capture phase equivalent of pointerover.

pointertap
pointertapcapture

Capture phase equivalent of pointertap.

pointerup
pointerupcapture

Capture phase equivalent of pointerup.

pointerupoutside
pointerupoutsidecapture

Capture phase equivalent of pointerupoutside.

removed
rightclick
rightclickcapture

Capture phase equivalent of rightclick.

rightdown
rightdowncapture

Capture phase equivalent of rightdown.

rightup
rightupcapture

Capture phase equivalent of rightup.

rightupoutside
rightupoutsidecapture

Capture phase equivalent of rightupoutside.

tap
tapcapture

Capture phase equivalent of tap.

touchcancel
touchcancelcapture

Capture phase equivalent of touchcancel.

touchend
touchendcapture

Capture phase equivalent of touchend.

touchendoutside
touchendoutsidecapture

Capture phase equivalent of touchendoutside.

touchmove
touchmovecapture

Capture phase equivalent of touchmove.

touchstart
touchstartcapture

Capture phase equivalent of touchstart.

PIXI.FederatedWheelEvent
wheel

Fired when a the user scrolls with the mouse cursor over a DisplayObject.

PIXI.FederatedWheelEvent
wheelcapture

Capture phase equivalent of wheel.

Public Properties


_dirty TransformerHandle.ts:83
_dirty: boolean = true

This flags whether this handle should be redrawn in the next frame due to style changes.

style TransformerHandle.ts:110
style: Partial<ITransformerHandleStyle>

The currently applied handle style.

Protected Properties


transformer TransformerHandle.ts:67
protected transformer: Transformer

Protected Methods


draw TransformerHandle.ts:135
protected draw() → {void}

Redraws the handle's geometry. This is called on a render if this._dirty is true.

Returns:
Type Description
void
onDrag TransformerHandle.ts:288
protected onDrag(e: PIXI.InteractionEvent) → {void}

Called on a pointermove when this._pointerDown & this._pointerDragging.

Parameters:
Name Type Description
e PIXI.InteractionEvent
Returns:
Type Description
void
onDragEnd TransformerHandle.ts:306
protected onDragEnd(_: PIXI.InteractionEvent) → {void}

Called on a pointerup or pointerupoutside & this._pointerDragging was true.

Parameters:
Name Type Description
_ PIXI.InteractionEvent
Returns:
Type Description
void
onDragStart TransformerHandle.ts:276
protected onDragStart(e: PIXI.InteractionEvent) → {void}

Called on the first pointermove when this._pointerDown is true. You must call the super implementation.

Parameters:
Name Type Description
e PIXI.InteractionEvent
Returns:
Type Description
void
onPointerDown TransformerHandle.ts:209
protected onPointerDown(e: PIXI.InteractionEvent) → {void}

Handles the pointerdown event. You must call the super implementation.

Parameters:
Name Type Description
e PIXI.InteractionEvent
Returns:
Type Description
void
onPointerMove TransformerHandle.ts:231
protected onPointerMove(e: PIXI.InteractionEvent) → {void}

Handles the pointermove event. You must call the super implementation.

Parameters:
Name Type Description
e PIXI.InteractionEvent
Returns:
Type Description
void
onPointerUp TransformerHandle.ts:255
protected onPointerUp(e: PIXI.InteractionEvent) → {void}

Handles the pointerup event. You must call the super implementation.

Parameters:
Name Type Description
e PIXI.InteractionEvent
Returns:
Type Description
void

Powered by webdoc!