@obliczeniowo/elementary
Version:
Library made in Angular version 19
44 lines (43 loc) • 2.53 kB
TypeScript
import { Point2D, ColorType } from '@obliczeniowo/elementary/classes';
import { DrawingContextInterface, LinePattern, LinePatternDef, TextAlign, TextBaseline } from './drawing-context-interface';
interface ModuleDef {
value: string;
added: boolean;
}
export declare class DrawingOpenScadInterface extends DrawingContextInterface {
protected openScad: string;
protected textAlign: TextAlign;
protected textBaseline: TextBaseline;
protected fontSize: number;
protected groups: boolean[];
protected modules: {
[module: string]: ModuleDef;
};
clear(): void;
getTextDimension(text: string): {
width: number;
height: number;
};
drawLine(startPoint: Point2D, endPoint: Point2D, stroke: number, color: ColorType, options?: any): DrawingContextInterface;
setColor(color: ColorType): 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;
}
export {};