/** * @file shape.ts * @brief Standalone glass frames, masks and DOM bounds tracking. */ import { GlassItem } from "./item.js"; import { type ShapeUpdate } from "./types.js"; /** * @brief One piece of glass on a canvas. * @details Made by `Glass.add`. */ export declare class GlassShape extends GlassItem { private x; private y; private width; private height; private radius; private corner; private masked; /** @brief Change any options; the ones left out keep their value. */ set(u: ShapeUpdate): this; /** @brief Move the shape (CSS pixels). */ move(x: number, y: number): this; /** @brief Resize the shape (CSS pixels), keeping its top-left corner. */ resize(width: number, height: number): this; /** * @brief Take the frame from an element's box, now and whenever the layout may have moved it: * resizes, scrolling, DOM changes, image and font loads, and CSS transitions. * @details The element gets the colors for content on this glass as the custom properties * `--glass-foreground` and `--glass-title`. * @param everyFrame Measure it on every frame as well (for elements moved by CSS animations). */ follow(element: Element, everyFrame?: boolean): this; /** @brief Stop following an element. */ unfollow(): void; protected paint(): void; private round; private applyCorners; private applyGeometry; }