displayObject static method
Returns a map of properties and accessors for tweening a GDisplayObject.
The returned map contains the following properties and their corresponding accessors:
- 'x': GDisplayObject.x
- 'y': GDisplayObject.y
- 'scaleX': GDisplayObject.scaleX
- 'scaleY': GDisplayObject.scaleY
- 'scale': GDisplayObject.scale
- 'rotation': GDisplayObject.rotation
- 'rotationX': GDisplayObject.rotationX
- 'rotationY': GDisplayObject.rotationY
- 'pivotX': GDisplayObject.pivotX
- 'pivotY': GDisplayObject.pivotY
- 'width': GDisplayObject.width
- 'height': GDisplayObject.height
- 'skewX': GDisplayObject.skewX
- 'skewY': GDisplayObject.skewY
- 'alpha': GDisplayObject.alpha
The returned map is a Map<String, List
Implementation
static Map<String, List<Function>> displayObject(GDisplayObject? o) {
// TODO: check performance to use a Custom mapping type.
return {
'x': [() => o!.x, (v) => o!.x = v],
'y': [() => o!.y, (v) => o!.y = v],
'scaleX': [() => o!.scaleX, (v) => o!.scaleX = v],
'scaleY': [() => o!.scaleY, (v) => o!.scaleY = v],
'scale': [() => o!.scale, (v) => o!.scale = v],
'rotation': [() => o!.rotation, (v) => o!.rotation = v],
'rotationX': [() => o!.rotationX, (v) => o!.rotationX = v],
'rotationY': [() => o!.rotationY, (v) => o!.rotationY = v],
'pivotX': [() => o!.pivotX, (v) => o!.pivotX = v],
'pivotY': [() => o!.pivotY, (v) => o!.pivotY = v],
'width': [() => o!.width, (v) => o!.width = v],
'height': [() => o!.height, (v) => o!.height = v],
'skewX': [() => o!.skewX, (v) => o!.skewX = v],
'skewY': [() => o!.skewY, (v) => o!.skewY = v],
'alpha': [() => o!.alpha, (v) => o!.alpha = v],
};
}