Class CAAT.Foundation.UI.ShapeActor
Extends
CAAT.Foundation.ActorContainer.
Defined in: ShapeActor.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
Set this shape composite operation when drawing it.
|
|
Stroke the shape with this line cap.
|
|
Stroke the shape with this line Join.
|
|
Stroke the shape with this line width.
|
|
Stroke the shape with this line mitter limit.
|
|
Define this actor shape: rectangle or circle
|
|
<static> |
CAAT.Foundation.UI.ShapeActor.SHAPE_CIRCLE
|
<static> |
CAAT.Foundation.UI.ShapeActor.SHAPE_RECTANGLE
|
- Fields borrowed from class CAAT.Foundation.ActorContainer:
- activeChildren, addHint, boundingBox, childrenList, layoutInvalidated, layoutManager, pendingChildrenList, runion
- Fields borrowed from class CAAT.Foundation.Actor:
- __super, AABB, alpha, backgroundImage, behaviorList, cached, clip, clipPath, dirty, discardable, duration, expired, fillStyle, frameAlpha, gestureEnabled, glEnabled, height, id, inFrame, invalid, isAA, isCachedActor, isGlobalAlpha, lifecycleListenerList, minimumSize, modelViewMatrix, modelViewMatrixI, mouseEnabled, oldX, oldY, parent, pointed, preferredSize, preventLayout, rotationAngle, rotationX, rotationY, scaleAnchor, scaleTX, scaleTY, scaleX, scaleY, size_active, size_total, start_time, strokeStyle, tAnchorX, tAnchorY, time, viewVertices, visible, wdirty, width, worldModelViewMatrix, worldModelViewMatrixI, x, y
Method Attributes | Method Name and Description |
---|---|
<private> |
__init()
|
paint(director, time)
Draws the shape.
|
|
<private> |
paintCircle(director, time)
|
paintRectangle(director, time)
Private
Draws a Rectangle.
|
|
setCompositeOp(compositeOp)
Sets the composite operation to apply on shape drawing.
|
|
setLineCap(lc)
|
|
setLineJoin(lj)
|
|
setLineWidth(l)
|
|
setMiterLimit(ml)
|
|
setShape(iShape)
Sets shape type.
|
- Methods borrowed from class CAAT.Foundation.ActorContainer:
- __paintActor, __validateLayout, __validateTree, addActor, addActorImmediately, addChild, addChildAt, addChildDelayed, addChildImmediately, animate, destroy, drawScreenBoundingBox, emptyChildren, endAnimate, findActorAtPosition, findActorById, findChild, getChildAt, getLayout, getNumActiveChildren, getNumChildren, invalidateLayout, paintActor, paintActorGL, recalcSize, removeChild, removeChildAt, removeFirstChild, removeLastChild, setBounds, setLayout, setZOrder
- Methods borrowed from class CAAT.Foundation.Actor:
- __scale1To, addAnimation, addBehavior, addListener, cacheAsBitmap, centerAt, centerOn, clean, contains, create, disableDrag, emptyBehaviorList, enableDrag, enableEvents, fireEvent, gestureChange, gestureEnd, gestureStart, getAnchor, getAnchorPercent, getBehavior, getId, getMinimumSize, getPreferredSize, getTextureGLPage, glNeedsFlush, glSetShader, initialize, invalidate, isCached, isGestureEnabled, isInAnimationFrame, isVisible, modelToModel, modelToView, mouseClick, mouseDblClick, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseOut, mouseOver, mouseUp, moveTo, playAnimation, removeBehaviorById, removeBehaviour, removeListener, resetAnimationTime, resetAsButton, resetTransform, rotateTo, scaleTo, scaleXTo, scaleYTo, setAlpha, setAnimationEndCallback, setAnimationImageIndex, setAsButton, setBackgroundImage, setBackgroundImageOffset, setButtonImageIndex, setCachedActor, setChangeFPS, setClip, setDiscardable, setExpired, setFillStyle, setFrameTime, setGestureEnabled, setGLCoords, setGlobalAlpha, setGlobalAnchor, setId, setImageTransformation, setLocation, setMinimumSize, setModelViewMatrix, setOutOfFrameTime, setPaint, setParent, setPosition, setPositionAnchor, setPositionAnchored, setPreferredSize, setPreventLayout, setRotation, setRotationAnchor, setRotationAnchored, setScale, setScaleAnchor, setScaleAnchored, setScreenBounds, setSize, setSpriteIndex, setStrokeStyle, setUV, setVisible, stopCacheAsBitmap, touchEnd, touchMove, touchStart, viewToModel
Field Detail
compositeOp
Set this shape composite operation when drawing it.
lineCap
Stroke the shape with this line cap.
lineJoin
Stroke the shape with this line Join.
lineWidth
Stroke the shape with this line width.
miterLimit
Stroke the shape with this line mitter limit.
shape
Define this actor shape: rectangle or circle
<static>
CAAT.Foundation.UI.ShapeActor.SHAPE_CIRCLE
<static>
CAAT.Foundation.UI.ShapeActor.SHAPE_RECTANGLE
Method Detail
<private>
__init()
getLineCap()
getLineJoin()
getLineWidth()
getMiterLimit()
paint(director, time)
Draws the shape.
Applies the values of fillStype, strokeStyle, compositeOp, etc.
- Parameters:
- director
- a valid CAAT.Director instance.
- time
- an integer with the Scene time the Actor is being drawn.
<private>
paintCircle(director, time)
- Parameters:
- director
- a valid CAAT.Director instance.
- time
- an integer with the Scene time the Actor is being drawn.
paintRectangle(director, time)
Private
Draws a Rectangle.
- Parameters:
- director
- a valid CAAT.Director instance.
- time
- an integer with the Scene time the Actor is being drawn.
setCompositeOp(compositeOp)
Sets the composite operation to apply on shape drawing.
- Parameters:
- compositeOp
- an string with a valid canvas rendering context string describing compositeOps.
- Returns:
- this
setLineCap(lc)
- Parameters:
- lc
- {string{butt|round|square}}
setLineJoin(lj)
- Parameters:
- lj
- {string{bevel|round|miter}}
setLineWidth(l)
- Parameters:
- l
- {number>0}
setMiterLimit(ml)
- Parameters:
- ml
- {integer>0}
setShape(iShape)
Sets shape type.
No check for parameter validity is performed.
Set paint method according to the shape.
- Parameters:
- iShape
- an integer with any of the SHAPE_* constants.
- Returns:
- this