UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

83 lines 4.26 kB
/** @packageDocumentation * @module Symbology */ import { Id64String } from "@itwin/core-bentley"; import { Angle, AngleProps, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps } from "@itwin/core-geometry"; import { ColorDef, ColorDefProps } from "../ColorDef"; /** @public */ export declare namespace AreaPattern { /** Single hatch line definition */ interface HatchDefLineProps { /** Angle of hatch line, 0.0 if undefined */ angle?: AngleProps; /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */ through?: XYProps; /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */ offset?: XYProps; /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */ dashes?: number[]; } class HatchDefLine implements HatchDefLineProps { angle?: Angle; through?: Point2d; offset?: Point2d; dashes?: number[]; constructor(json: HatchDefLineProps); } /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region. * @see [[GeometryStreamEntryProps]] */ interface ParamsProps { /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */ origin?: XYZProps; /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */ rotation?: YawPitchRollProps; /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */ space1?: number; /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */ space2?: number; /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */ angle1?: AngleProps; /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */ angle2?: AngleProps; /** Scale to apply to area pattern symbol, 1.0 if undefined */ scale?: number; /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */ color?: ColorDefProps; /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */ weight?: number; /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */ invisibleBoundary?: boolean; /** Set to allow snapping to pattern geometry, false if undefined */ snappable?: boolean; /** [[GeometryPart]] id to use for tiled area pattern display */ symbolId?: Id64String; /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */ defLines?: HatchDefLineProps[]; } /** Defines a hatch, cross hatch, or area pattern. */ class Params { origin?: Point3d; rotation?: YawPitchRollAngles; space1?: number; space2?: number; angle1?: Angle; angle2?: Angle; scale?: number; color?: ColorDef; weight?: number; invisibleBoundary?: boolean; snappable?: boolean; symbolId?: Id64String; defLines?: HatchDefLine[]; /** create an AreaPattern.Params from a json object. */ static fromJSON(json?: ParamsProps): Params; toJSON(): ParamsProps; clone(): Params; equals(other: Params): boolean; static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number; static getTransformPatternScale(transform: Transform): number; applyTransform(transform: Transform): boolean; } } //# sourceMappingURL=AreaPattern.d.ts.map