iink-ts - v4.0.0
    Preparing search index...

    Variable ShapePolygonOpsConst

    ShapePolygonOps: {
        create(
            points: TPoint[],
            style?: {
                color?: string;
                fill?: string;
                opacity?: number;
                width?: number;
                [key: string]: string | number | undefined;
            },
        ): TShapePolygon;
        createFromPartial(
            partial: {
                bounds?: {
                    angle?: number;
                    center?: { x?: number; y?: number };
                    height?: number;
                    width?: number;
                };
                creationTime?: number;
                edges?: (
                    | {
                        p1?: { x?: number; y?: number };
                        p2?: { x?: number; y?: number };
                    }
                    | undefined
                )[];
                id?: string;
                kind?: Polygon;
                modificationDate?: number;
                points?: ({ x?: number; y?: number } | undefined)[];
                snapPoints?: ({ x?: number; y?: number } | undefined)[];
                style?: {
                    color?: string;
                    fill?: string;
                    opacity?: number;
                    width?: number;
                    [key: string]: string | number | undefined;
                };
                type?: Shape;
                vertices?: ({ x?: number; y?: number } | undefined)[];
            },
        ): TShapePolygon;
        createParallelogramBetweenPoints(
            origin: TPoint,
            target: TPoint,
            style?: {
                color?: string;
                fill?: string;
                opacity?: number;
                width?: number;
                [key: string]: string | number | undefined;
            },
        ): TShapePolygon;
        createRectangleBetweenPoints(
            origin: TPoint,
            target: TPoint,
            style?: {
                color?: string;
                fill?: string;
                opacity?: number;
                width?: number;
                [key: string]: string | number | undefined;
            },
        ): TShapePolygon;
        createRhombusBetweenPoints(
            origin: TPoint,
            target: TPoint,
            style?: {
                color?: string;
                fill?: string;
                opacity?: number;
                width?: number;
                [key: string]: string | number | undefined;
            },
        ): TShapePolygon;
        createTriangleBetweenPoints(
            origin: TPoint,
            target: TPoint,
            style?: {
                color?: string;
                fill?: string;
                opacity?: number;
                width?: number;
                [key: string]: string | number | undefined;
            },
        ): TShapePolygon;
        getSVGPath(polygon: TShapePolygon): string;
        overlaps(polygon: TShapePolygon, box: TBox): boolean;
        updateDerivedFields(polygon: TShapePolygon): void;
        updateParallelogramBetweenPoints(
            poly: TShapePolygon,
            origin: TPoint,
            target: TPoint,
        ): void;
        updateRectangleBetweenPoints(
            poly: TShapePolygon,
            origin: TPoint,
            target: TPoint,
        ): void;
        updateRhombusBetweenPoints(
            poly: TShapePolygon,
            origin: TPoint,
            target: TPoint,
        ): void;
        updateTriangleBetweenPoints(
            poly: TShapePolygon,
            origin: TPoint,
            target: TPoint,
        ): void;
    } = ...

    Type Declaration

    • create: function
      • Parameters

        • points: TPoint[]
        • Optionalstyle: {
              color?: string;
              fill?: string;
              opacity?: number;
              width?: number;
              [key: string]: string | number | undefined;
          }

        Returns TShapePolygon

    • createFromPartial: function
      • Parameters

        • partial: {
              bounds?: {
                  angle?: number;
                  center?: { x?: number; y?: number };
                  height?: number;
                  width?: number;
              };
              creationTime?: number;
              edges?: (
                  | { p1?: { x?: number; y?: number }; p2?: { x?: number; y?: number } }
                  | undefined
              )[];
              id?: string;
              kind?: Polygon;
              modificationDate?: number;
              points?: ({ x?: number; y?: number } | undefined)[];
              snapPoints?: ({ x?: number; y?: number } | undefined)[];
              style?: {
                  color?: string;
                  fill?: string;
                  opacity?: number;
                  width?: number;
                  [key: string]: string | number | undefined;
              };
              type?: Shape;
              vertices?: ({ x?: number; y?: number } | undefined)[];
          }

        Returns TShapePolygon

    • createParallelogramBetweenPoints: function
      • Parameters

        • origin: TPoint
        • target: TPoint
        • Optionalstyle: {
              color?: string;
              fill?: string;
              opacity?: number;
              width?: number;
              [key: string]: string | number | undefined;
          }

        Returns TShapePolygon

    • createRectangleBetweenPoints: function
      • Parameters

        • origin: TPoint
        • target: TPoint
        • Optionalstyle: {
              color?: string;
              fill?: string;
              opacity?: number;
              width?: number;
              [key: string]: string | number | undefined;
          }

        Returns TShapePolygon

    • createRhombusBetweenPoints: function
      • Parameters

        • origin: TPoint
        • target: TPoint
        • Optionalstyle: {
              color?: string;
              fill?: string;
              opacity?: number;
              width?: number;
              [key: string]: string | number | undefined;
          }

        Returns TShapePolygon

    • createTriangleBetweenPoints: function
      • Parameters

        • origin: TPoint
        • target: TPoint
        • Optionalstyle: {
              color?: string;
              fill?: string;
              opacity?: number;
              width?: number;
              [key: string]: string | number | undefined;
          }

        Returns TShapePolygon

    • getSVGPath: function
      • Parameters

        Returns string

    • overlaps: function
    • updateDerivedFields: function
      • Parameters

        Returns void

    • updateParallelogramBetweenPoints: function
    • updateRectangleBetweenPoints: function
    • updateRhombusBetweenPoints: function
    • updateTriangleBetweenPoints: function