UNPKG

@daign/2d-graphics

Version:

Two dimensional graphics library that implements the daign-2d-pipeline.

26 lines (25 loc) 736 B
import { Matrix3, Vector2 } from '@daign/math'; import { StyledGraphicNode } from '../styledGraphicNode'; /** * Abstract class for single point elements at an anchor position. */ export declare abstract class SinglePointElement extends StyledGraphicNode { /** * Getter for the anchor position. */ get anchor(): Vector2; /** * Setter for the anchor position. */ set anchor(position: Vector2); /** * Constructor. */ constructor(); /** * Calculate the anchor point after a given transformation. * @param transformation - The transformation to apply. * @returns The transformed anchor position. */ getAnchorTransformed(transformation: Matrix3): Vector2; }