UNPKG

@obliczeniowo/elementary

Version:
33 lines (32 loc) 2.25 kB
import { Point2D, ColorType } from '@obliczeniowo/elementary/classes'; import { DrawingContextInterface, LinePattern, LinePatternDef, TextAlign, TextBaseline } from './drawing-context-interface'; export declare class DrawingZwCadCommandInterface extends DrawingContextInterface { protected data: string; protected textAlign: TextAlign; protected fontSize: number; clear(): void; getTextDimension(text: string): { width: number; height: number; }; drawLine(startPoint: Point2D, endPoint: Point2D, stroke: number, color: ColorType, options?: any): DrawingContextInterface; drawText(text: string, handlePosition: Point2D, color: ColorType, angle: number, options?: any): DrawingContextInterface; drawPolyline(points: Point2D[], stroke: number, color: ColorType, options?: { close?: boolean; [key: string]: any; }): DrawingContextInterface; drawPolygon(points: Point2D[], stroke: number, color: ColorType, fill: ColorType, options?: any): DrawingContextInterface; drawCircle(point: Point2D, ray: number, stroke: number, strokeColor: ColorType, fillColor: ColorType, options?: any): DrawingContextInterface; drawPie(center: Point2D, rx: number, ry: number, start: number, end: number, stroke: number, strokeColor: ColorType, fillColor: ColorType, options?: any): DrawingContextInterface; drawEllipse(point: Point2D, xRay: number, yRay: number, stroke: number, strokeColor: ColorType, fillColor: ColorType, options?: any): DrawingContextInterface; drawRect(x: number, y: number, width: number, height: number, stroke: number, strokeColor: ColorType, fillColor: ColorType, options?: any): DrawingContextInterface; lineTo(point: Point2D, stroke: number, color: ColorType): DrawingContextInterface; setFontSize(fontSize: number): DrawingContextInterface; getFontSize(): number; setTextAlign(align: TextAlign): DrawingContextInterface; setTextBaseline(textBaseline: TextBaseline): DrawingContextInterface; getTextWidth(text: string): number; setLinePattern(linePattern: LinePattern | string | undefined, linePatternDef?: LinePatternDef): DrawingContextInterface; getLineStrokeSize(size?: number): number; save(fileName: string): this; }