import type { FullObject } from "@hylimo/core"; import type { Size, Element } from "@hylimo/diagram-common"; import { Point } from "@hylimo/diagram-common"; import type { LayoutElement } from "../../layoutElement.js"; import type { Layout } from "../../engine/layout.js"; import { StyledElementLayoutConfig } from "../styledElementLayoutConfig.js"; /** * Layout config for the canvas */ export declare class CanvasLayoutConfig extends StyledElementLayoutConfig { type: string; constructor(); measure(layout: Layout, element: LayoutElement): Size; layout(layout: Layout, element: LayoutElement, position: Point, size: Size, id: string): Element[]; /** * Calculates the bounds of a rotated rectangle * Model: * A rectangle is located at pos (where pos is the top left corner). * The rectangle has the given width and height. * The rectangle is then moved by x and y relative to pos, and then rotated by rotation around pos. * The model was chosen as it maps relatively well to the bounding box of a canvas element and marker. * * @param pos the position of the element * @param rotation the rotation of the element in degrees * @param x the relative x position * @param y the relative y position * @param width the width of the element * @param height the height of the element * @returns the bounds of the element */ private calculateRotatedRectangleBounds; /** * Calculates the bounds for the given canvas element * * @param element the element to calculate the bounds for * @param layout the layout providing the canvas layout engine * @returns the bounds of the element */ private calculateCanvasElementBounds; /** * Calculates the bounds for the given canvas connection * * @param connection the connection to calculate the bounds for * @param layout the layout providing the canvas layout engine * @returns the bounds of the connection (and if existing, the markers) */ private calculateConnectionBounds; /** * Calculates the bounds for the given marker * See {@link Marker} how a marker is aligned relative to the connection start or end * * @param markerLayout the layout information of the marker * @returns the bounds of the marker */ private calculateMarkerBounds; getChildren(element: LayoutElement): FullObject[]; } //# sourceMappingURL=canvasLayoutConfig.d.ts.map