All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.rendering-util.rendering-elements.shapes.util.d.ts Maven / Gradle / Ivy

Go to download

Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.

The newest version!
import type { Node } from '../../types.js';
import type { D3Selection, Point } from '../../../types.js';
export declare const labelHelper: (parent: D3Selection, node: Node, _classes?: string) => Promise<{
    shapeSvg: import("d3-selection").Selection;
    bbox: any;
    halfPadding: number;
    label: import("d3-selection").Selection;
}>;
export declare const insertLabel: (parent: D3Selection, label: string, options: {
    labelStyle?: string | undefined;
    icon?: boolean | undefined;
    img?: string | undefined;
    useHtmlLabels?: boolean | undefined;
    padding: number;
    width?: number | undefined;
    centerLabel?: boolean | undefined;
    addSvgBackground?: boolean | undefined;
}) => Promise<{
    shapeSvg: D3Selection;
    bbox: any;
    halfPadding: number;
    label: import("d3-selection").Selection;
}>;
export declare const updateNodeBounds: (node: Node, element: D3Selection | D3Selection) => void;
/**
 * @param parent - Parent element to append the polygon to
 * @param w - Width of the polygon
 * @param h - Height of the polygon
 * @param points - Array of points to create the polygon
 */
export declare function insertPolygonShape(parent: D3Selection, w: number, h: number, points: Point[]): import("d3-selection").Selection;
export declare const getNodeClasses: (node: Node, extra?: string) => string;
export declare function createPathFromPoints(points: Point[]): string;
export declare function generateFullSineWavePoints(x1: number, y1: number, x2: number, y2: number, amplitude: number, numCycles: number): {
    x: number;
    y: number;
}[];
/**
 * @param centerX - x-coordinate of center of circle
 * @param centerY - y-coordinate of center of circle
 * @param radius - radius of circle
 * @param numPoints - total points required
 * @param startAngle - angle where arc will start
 * @param endAngle - angle where arc will end
 */
export declare function generateCirclePoints(centerX: number, centerY: number, radius: number, numPoints: number, startAngle: number, endAngle: number): {
    x: number;
    y: number;
}[];




© 2015 - 2024 Weber Informatics LLC | Privacy Policy