starling-framework
Version:
A fast, productive library for 2D cross-platform development.
54 lines • 1.45 kB
TypeScript
import EventDispatcher from "../events/EventDispatcher";
declare namespace starling.utils {
/**
* Dispatched when any property of the instance changes.
*/
export class Padding extends EventDispatcher {
/**
* Creates a new instance with the given properties.
*/
constructor(left?: number, right?: number, top?: number, bottom?: number);
/**
* Sets all four values at once.
*/
setTo(left?: number, right?: number, top?: number, bottom?: number): void;
/**
* Sets all four sides to the same value.
*/
setToUniform(value: number): void;
/**
* Sets left and right to <code>horizontal</code>, top and bottom to <code>vertical</code>.
*/
setToSymmetric(horizontal: number, vertical: number): void;
/**
* Copies all properties from another Padding instance.
* * Pass <code>null</code> to reset all values to zero.
*/
copyFrom(padding: Padding): void;
/**
* Creates a new instance with the exact same values.
*/
clone(): Padding;
/**
* The padding on the left side.
*/
get left(): number;
set left(value: number)
/**
* The padding on the right side.
*/
get right(): number;
set right(value: number)
/**
* The padding towards the top.
*/
get top(): number;
set top(value: number)
/**
* The padding towards the bottom.
*/
get bottom(): number;
set bottom(value: number)
}
}
export default starling.utils.Padding;