UNPKG

@logic-pad/core

Version:
34 lines (33 loc) 1.28 kB
import { AnyConfig } from '../config.js'; import GridData from '../grid.js'; import CustomSymbol from './customSymbol.js'; export default class CustomTextSymbol extends CustomSymbol { readonly text: string; readonly rotation: number; private static readonly EXAMPLE_GRID; private static readonly CONFIGS; /** * **A custom text symbol** * * @param description - The description of the symbol. Leave this empty to hide the description. * @param grid - The thumbnail grid of the rule, preferably 5x4 in size. * @param x - The x-coordinate of the symbol. * @param y - The y-coordinate of the symbol. * @param text - The text to display. * @param rotation - The rotation of the text in degrees. */ constructor(description: string, grid: GridData, x: number, y: number, text: string, rotation?: number); get id(): string; get configs(): readonly AnyConfig[] | null; copyWith({ description, grid, x, y, text, rotation, }: { description?: string; grid?: GridData; x?: number; y?: number; text?: string; rotation?: number; }): this; withText(text: string): this; withRotation(rotation: number): this; } export declare const instance: CustomTextSymbol;