@daign/2d-graphics
Version:
Two dimensional graphics library that implements the daign-2d-pipeline.
28 lines (27 loc) • 852 B
TypeScript
import { Matrix3, Vector2 } from '@daign/math';
import { StyledGraphicNode } from '../styledGraphicNode';
/**
* Class for a line segment element.
*/
export declare class Line 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;
}