UNPKG

@daign/2d-graphics

Version:

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

34 lines (33 loc) 1.12 kB
import { Matrix3, Vector2 } from '@daign/math'; import { StyledGraphicNode } from '../styledGraphicNode'; /** * Class for a pattern element, whose size is defined by two points. */ export declare class TwoPointPattern extends StyledGraphicNode { get start(): Vector2; set start(position: Vector2); get end(): Vector2; set end(position: Vector2); /** * Constructor. */ constructor(); /** * Calculate the start after a given transformation. * @param transformation - The transformation to apply. * @returns The transformed start position. */ getStartTransformed(transformation: Matrix3): Vector2; /** * Calculate the end after a given transformation. * @param transformation - The transformation to apply. * @returns The transformed end position. */ getEndTransformed(transformation: Matrix3): Vector2; /** * Calculate the size after a given transformation. * @param transformation - The transformation to apply. * @returns The transformed size. */ getSizeTransformed(transformation: Matrix3): Vector2; }