import '../../../globals.js';
import { scenery } from '../imports.js';
let globalId = 1;
export default class Paint {
    constructor() {
        this.id = `paint${globalId++}`;
        this.transformMatrix = null;
    }
    /**
     * Sets how this paint (pattern/gradient) is transformed, compared with the local coordinate frame of where it is
     *
     * NOTE: This should only be used before the pattern/gradient is ever displayed.
     * TODO: Catch if this is violated? https://github.com/phetsims/scenery/issues/1581
     *
     * NOTE: The scale should be symmetric if it will be used as a stroke. It is difficult to set a different x and y scale
     * for canvas at the same time.
     */
    setTransformMatrix(transformMatrix) {
        if (this.transformMatrix !== transformMatrix) {
            this.transformMatrix = transformMatrix;
        }
        return this;
    }
    /**
     * Returns a string form of this object
     */
    toString() {
        return this.id;
    }
}
// TODO: can we remove this in favor of type checks? https://github.com/phetsims/scenery/issues/1581
Paint.prototype.isPaint = true;
scenery.register('Paint', Paint);
//# sourceMappingURL=Paint.js.map