@aurigma/design-atoms
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
74 lines (73 loc) • 2.85 kB
TypeScript
import { ItemHandlersCollection } from "./ItemHandlers/ItemHandlersCollection";
import { RectangleF } from "@aurigma/design-atoms-model/Math/RectangleF";
import { Container } from "@aurigma/design-atoms-model/Product/Container";
import { Collection, RgbColor } from "@aurigma/design-atoms-model";
import { ItemHandler } from "./ItemHandlers";
import { ICanvas } from "./ICanvas";
/**
* Represents a design element on the canvas.
*
* This client-side class corresponds to the server-side class `Canvas` and provides access to its primary members in TypeScript.
*/
export declare class Layer {
private readonly _container?;
private readonly _disposeEvent;
private _itemHandlers;
private _canvas;
private _uniqueId;
private _visible;
private _locked;
private _textureSizeMultiplier;
private _textureUrl;
private _isTextureLoaded;
textureImage: HTMLCanvasElement | HTMLImageElement;
/** @internal */
constructor(_container?: Container, canvas?: ICanvas);
/** Gets a unique ID used for deserialization. */
get uniqueId(): string;
/** Sets a unique ID used for deserialization. */
set uniqueId(v: string);
get canvas(): ICanvas;
set canvas(value: ICanvas);
get data(): string;
set data(v: string);
/** Gets or sets the rectangle region on the layer surface in which v-objects can be placed. */
get region(): RectangleF;
set region(region: RectangleF);
get itemHandlers(): ItemHandlersCollection;
get name(): string;
set name(v: string);
get visible(): boolean;
set visible(v: boolean);
get locked(): boolean;
set locked(v: boolean);
get container(): Container;
get textureStorageId(): string;
set textureStorageId(v: string);
get textureSourceWidth(): number;
set textureSourceWidth(v: number);
get textureSourceHeight(): number;
set textureSourceHeight(v: number);
get previewColor(): RgbColor;
set previewColor(value: RgbColor);
get ditherType(): import("@aurigma/design-atoms-model/Product/Dither").Dither;
get ditherAmount(): number;
get renderingType(): import("@aurigma/design-atoms-model").RenderingType;
get flatItemHandlers(): Collection<ItemHandler>;
onLayerAdded(): void;
updateTexture: (forceUpdate?: boolean) => void;
private _refreshImageItems;
private _updateImageTexture;
private _createColorTexture;
private _loadImageTexture;
isTextureLoadedOrNotExists(): boolean;
dispose(): void;
private _createItemHandlersCollection;
private _onContainerPropertyChanged;
private _isIgnorePermissionsMode;
private _isSurfaceLayer;
private _updateState;
private _onZoomChanged;
private _getTextureSource;
private _getPreviewColor;
}