import { EditorAPI, Id } from '../types/CommonTypes'; import { ColorUsage } from '../types/ColorStyleTypes'; /** * The ShapeController is responsible for all communication regarding Shapes. * Methods inside this controller can be called by `window.SDK.shape.{method-name}` */ export declare class ShapeController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method updates properties of the shape * @param id the id of the shapeFrame that needs to get updated. * @param properties A property to update * @returns */ private setShapeProperties; /** * This method will set the visibility of the shape fill. * @param id the id of the shapeFrame that needs to get updated. * @param enableFill Whether the shape fill is visible. * @returns */ setEnableFill: (id: Id, enableFill: boolean) => Promise>; /** * This method will set the shape fill color of a specified shape frame. * @param id the id of the shapeFrame that needs to get updated. * @param fillColor the new shape fill color that you want to set to the shapeFrame. * @returns */ setFillColor: (id: Id, fillColor: ColorUsage) => Promise>; /** * This method will set the visibility of the shape stroke. * @param id the id of the shapeFrame that needs to get updated. * @param enableStroke Whether the shape stroke is visible. * @returns */ setEnableStroke: (id: Id, enableStroke: boolean) => Promise>; /** * This method will set the shape stroke color of a specified shape frame. * @param id the id of the shapeFrame that needs to get updated. * @param strokeColor the new shape stroke color that you want to set to the shapeFrame. * @returns */ setStrokeColor: (id: Id, strokeColor: ColorUsage) => Promise>; /** * This method will set the shape stroke weight of a specified shape frame. * @param id the id of the shapeFrame that needs to get updated. * @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame. * @returns */ setStrokeWeight: (id: Id, strokeWeight: number) => Promise>; /** * This method will set the flag to change the way the rectangle shape corners will be changed: all at once or separately. * @param id the id of the shapeFrame that needs to get updated. * @param allCornersSame the new flag that you want to set to the shapeFrame. * @returns */ setFlagAllCornersSame: (id: Id, allCornersSame: boolean) => Promise>; /** * This method updates radii of the rectangle and polygon shapes * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius object to update a desired corner; * @returns */ private setShapeCorners; /** * This method will set the radius for all corners of the rectangle and polygon shapes * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius to update all corners at once; * @returns */ setRadiusAll: (id: Id, radius: number) => Promise>; /** * This method will set the radius for the top left corner of the rectangle shape * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius to update the top left corner; * @returns */ setRadiusTopLeft: (id: Id, radius: number) => Promise>; /** * This method will set the radius for the bottom left corner of the rectangle shape * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius to update the bottom left corner; * @returns */ setRadiusBottomLeft: (id: Id, radius: number) => Promise>; /** * This method will set the radius for the top right corner of the rectangle shape * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius to update the top right corner; * @returns */ setRadiusTopRight: (id: Id, radius: number) => Promise>; /** * This method will set the radius for the bottom right corner of the rectangle shape * @param id the id of the shapeFrame that needs to get updated. * @param radius A radius to update the bottom right corner; * @returns */ setRadiusBottomRight: (id: Id, radius: number) => Promise>; }