@itwin/core-common 5.2.0-dev.8 → 5.3.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/lib/cjs/BriefcaseTypes.d.ts +2 -0
- package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +8 -0
- package/lib/cjs/ElementProps.d.ts.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
- package/lib/cjs/FeatureSymbology.js +0 -2
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.d.ts +114 -104
- package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlock.js +227 -108
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.d.ts +86 -0
- package/lib/cjs/annotation/TextField.d.ts.map +1 -0
- package/lib/cjs/annotation/TextField.js +10 -0
- package/lib/cjs/annotation/TextField.js.map +1 -0
- package/lib/cjs/annotation/TextStyle.d.ts +63 -1
- package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
- package/lib/cjs/annotation/TextStyle.js +44 -4
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.d.ts +1 -0
- package/lib/cjs/core-common.d.ts.map +1 -1
- package/lib/cjs/core-common.js +1 -0
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/cjs/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js +66 -0
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/cjs/internal/cross-package.d.ts +1 -0
- package/lib/cjs/internal/cross-package.d.ts.map +1 -1
- package/lib/cjs/internal/cross-package.js +4 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/esm/BriefcaseTypes.d.ts +2 -0
- package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +8 -0
- package/lib/esm/ElementProps.d.ts.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/FeatureSymbology.d.ts.map +1 -1
- package/lib/esm/FeatureSymbology.js +0 -2
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.d.ts +114 -104
- package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlock.js +223 -107
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts +3 -5
- package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.d.ts +86 -0
- package/lib/esm/annotation/TextField.d.ts.map +1 -0
- package/lib/esm/annotation/TextField.js +9 -0
- package/lib/esm/annotation/TextField.js.map +1 -0
- package/lib/esm/annotation/TextStyle.d.ts +63 -1
- package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
- package/lib/esm/annotation/TextStyle.js +43 -3
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.d.ts +1 -0
- package/lib/esm/core-common.d.ts.map +1 -1
- package/lib/esm/core-common.js +1 -0
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.d.ts +18 -0
- package/lib/esm/internal/annotations/FieldFormatter.d.ts.map +1 -0
- package/lib/esm/internal/annotations/FieldFormatter.js +62 -0
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -0
- package/lib/esm/internal/cross-package.d.ts +1 -0
- package/lib/esm/internal/cross-package.d.ts.map +1 -1
- package/lib/esm/internal/cross-package.js +1 -0
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,iDAAoD;AAEpD,qDAAiD;AAEjD,yCAAqD;AAGrD,SAAS,oBAAoB,CAAC,GAAmB,EAAE,GAAqB;IACtE,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,EAAE,IAAI,GAAG;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AA+BD,SAAS,kBAAkB,CAAC,KAA6B;IACvD,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO;WAC9B,SAAS,KAAK,KAAK,CAAC,MAAM,IAAI,SAAS,KAAK,KAAK,CAAC,UAAU;WAC5D,SAAS,KAAK,KAAK,CAAC,YAAY,IAAI,SAAS,KAAK,KAAK,C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AE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;gBACzH,OAAO,GAAG,CAAC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;YAC/C,CAAC;SACF,CAAC;IACJ,CAAC;IAPe,oCAAU,aAOzB,CAAA;IAED;;;OAGG;IACH,SAAgB,KAAK,CAAC,KAAgC,EAAE,MAAiC;QACvF,IAAI,KAAK,KAAK,MAAM;YAClB,OAAO,KAAK,CAAC;QAEf,OAAO;YACL,oBAAoB,EAAE,CAAC,MAA+B,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB,EAAE,EAAE;gBAClO,OAAO,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YAClJ,CAAC;SACF,CAAC;IACJ,CAAC;IATe,+BAAK,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,yCAAzB,yBAAyB,QAqCzC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { BatchType, Feature } from \"./FeatureTable\";\nimport { ColorDef } from \"./ColorDef\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\n\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\n dst.clear();\n if (typeof src === \"string\") {\n dst.addId(src);\n } else {\n for (const id of src)\n dst.addId(id);\n }\n}\n\n// cspell:ignore subcat subcats\n\n/** JSON representation of a [[FeatureAppearance]].\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProps {\n /** See [[FeatureAppearance.rgb]]. */\n rgb?: RgbColorProps;\n /** See [[FeatureAppearance.lineRgb]]. */\n lineRgb?: RgbColorProps | false;\n /** See [[FeatureAppearance.weight]]. */\n weight?: number;\n /** See [[FeatureAppearance.transparency]]. */\n transparency?: number;\n /** See [[FeatureAppearance.lineTransparency]]. */\n lineTransparency?: number | false;\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\n viewDependentTransparency?: true;\n /** See [[FeatureAppearance.linePixels]]. */\n linePixels?: LinePixels;\n /** See [[FeatureAppearance.ignoresMaterial]]. */\n ignoresMaterial?: true;\n /** See [[FeatureAppearance.nonLocatable]]. */\n nonLocatable?: true;\n /** See [[FeatureAppearance.emphasized]]. */\n emphasized?: true;\n}\n\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\n return !props.rgb && !props.lineRgb\n && undefined === props.weight && undefined === props.linePixels\n && undefined === props.transparency && undefined === props.lineTransparency\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\n}\n\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\n if (a === b) {\n return true;\n } else if (!a || !b) {\n return false;\n } else {\n return a.equals(b);\n }\n}\n\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\n return equalRgb(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\n if (a === b) {\n return true;\n } else if (undefined === a || undefined === b) {\n return false;\n } else {\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\n }\n}\n\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (typeof a === \"number\" && typeof b === \"number\") {\n return equalTransparency(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\n if (undefined === transp) {\n return undefined;\n }\n\n transp = Math.max(0, Math.min(transp, 1));\n\n // Fix up rounding errors...\n const smallDelta = 0.0001;\n if (1.0 - transp < smallDelta) {\n transp = 1.0;\n } else if (transp < smallDelta) {\n transp = 0.0;\n }\n\n return transp;\n}\n\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\n *\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\n * Linear geometry consists of any of the following:\n * - Curves and line strings;\n * - Points and point strings; and\n * - The outlines of planar regions.\n * The edges of 3d surfaces like spheres are not considered linear geometry.\n *\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\n * @public\n */\nexport class FeatureAppearance {\n /** Overrides the feature's color.\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\n */\n public readonly rgb?: RgbColor;\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\n */\n public readonly lineRgb?: RgbColor | false;\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\n public readonly weight?: number;\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly transparency?: number;\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly lineTransparency?: number | false;\n /** The pixel pattern applied to lines and edges. */\n public readonly linePixels?: LinePixels;\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\n public readonly ignoresMaterial?: true;\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\n public readonly nonLocatable?: true;\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\n public readonly emphasized?: true;\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\n * This property has no effect if this appearance does not override transparency.\n */\n public readonly viewDependentTransparency?: true;\n\n /** An appearance that overrides nothing. */\n public static readonly defaults = new FeatureAppearance({});\n\n public static fromJSON(props?: FeatureAppearanceProps) {\n if (!props || propsMatchDefaults(props)) {\n return this.defaults;\n }\n\n return new FeatureAppearance(props);\n }\n\n /** Create a FeatureAppearance that overrides only the RGB color.\n * @note The transparency component of the ColorDef is ignored.\n */\n public static fromRgb(color: ColorDef): FeatureAppearance {\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\n }\n\n /** Create a FeatureAppearance that overrides the RGB and transparency.\n * The appearance's transparency is derived from the transparency component of the ColorDef.\n */\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\n return new FeatureAppearance({\n rgb: RgbColor.fromColorDef(color),\n transparency: color.colors.t / 255,\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\n });\n }\n /** Create a FeatureAppearance that overrides only the transparency */\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\n return new FeatureAppearance({\n transparency: transparencyValue,\n viewDependentTransparency: viewDependent ? true : undefined,\n });\n }\n\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\n */\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\n const transparency = ovr.transparency;\n const weight = ovr.weight;\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\n }\n\n /** Returns true if this appearance does not override any aspects of symbology. */\n public get matchesDefaults(): boolean {\n return this.equals(FeatureAppearance.defaults);\n }\n\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\n public get overridesWeight(): boolean { return undefined !== this.weight; }\n\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\n */\n public getLineRgb(): RgbColor | undefined {\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\n }\n\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\n */\n public getLineTransparency(): number | undefined {\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\n }\n\n public get overridesSymbology(): boolean {\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\n || this.emphasized || this.overridesNonLocatable\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\n }\n\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\n\n public get isFullyTransparent(): boolean {\n const surf = this.transparency ?? 0;\n const line = this.getLineTransparency() ?? 0;\n return surf >= 1 && line >= 1;\n }\n\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\n\n public equals(other: FeatureAppearance): boolean {\n if (this === other)\n return true;\n\n return equalRgb(this.rgb, other.rgb)\n && this.weight === other.weight\n && equalTransparency(this.transparency, other.transparency)\n && this.linePixels === other.linePixels\n && this.ignoresMaterial === other.ignoresMaterial\n && this.nonLocatable === other.nonLocatable\n && this.emphasized === other.emphasized\n && this.viewDependentTransparency === other.viewDependentTransparency\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\n && equalLineRgb(this.lineRgb, other.lineRgb);\n }\n\n public toJSON(): FeatureAppearanceProps {\n const props: FeatureAppearanceProps = {};\n if (this.rgb)\n props.rgb = this.rgb.toJSON();\n\n if (undefined !== this.weight)\n props.weight = this.weight;\n\n if (undefined !== this.transparency) {\n props.transparency = this.transparency;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n if (undefined !== this.linePixels)\n props.linePixels = this.linePixels;\n\n if (true === this.ignoresMaterial)\n props.ignoresMaterial = true;\n\n if (true === this.nonLocatable)\n props.nonLocatable = true;\n\n if (true === this.emphasized)\n props.emphasized = true;\n\n if (undefined !== this.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.lineRgb) {\n props.lineRgb = this.lineRgb;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n return props;\n }\n\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.clone]].\n */\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\n return {\n ...this.toJSON(),\n ...changedProps,\n };\n }\n\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.cloneProps]].\n */\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\n }\n\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\n if (!this.overridesSymbology)\n return base;\n\n const props = base.toJSON();\n if (undefined === props.rgb)\n props.rgb = this.rgb;\n if (undefined === props.transparency)\n props.transparency = this.transparency;\n if (undefined === props.linePixels)\n props.linePixels = this.linePixels;\n if (undefined === props.weight)\n props.weight = this.weight;\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\n props.ignoresMaterial = true;\n if (undefined === props.nonLocatable && this.nonLocatable)\n props.nonLocatable = true;\n if (undefined === props.emphasized && this.emphasized)\n props.emphasized = true;\n if (!props.lineRgb)\n props.lineRgb = this.lineRgb;\n if (undefined === props.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\n props.viewDependentTransparency = true;\n\n return FeatureAppearance.fromJSON(props);\n }\n\n protected constructor(props: FeatureAppearanceProps) {\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\n\n this.transparency = transparencyFromJSON(props.transparency);\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\n\n this.weight = props.weight;\n this.linePixels = props.linePixels;\n\n this.ignoresMaterial = props.ignoresMaterial;\n this.nonLocatable = props.nonLocatable;\n this.emphasized = props.emphasized;\n\n if (undefined !== this.weight) {\n this.weight = Math.max(1, Math.min(this.weight, 32));\n }\n\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\n this.viewDependentTransparency = true;\n }\n }\n}\n\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\n * @see [[FeatureOverrides]] for the commonly-used implementation.\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceSource {\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** Common options for [[FeatureOverrides.override]].\n * @public\n */\nexport interface OverrideFeatureAppearanceOptions {\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\n appearance: FeatureAppearance;\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\n * if also overridden by [[appearance]].\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\n * apply if that aspect is not already overridden by a previous appearance.\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\n * - \"skip\": Keep the existing appearance.\n */\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\n * @public\n */\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the model whose appearance is to be overridden. */\n modelId: Id64String;\n elementId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\n * @public\n */\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the element whose appearance is to be overridden. */\n elementId: Id64String;\n modelId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\n * @public\n */\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the subcategory whose appearance is to be overridden. */\n subCategoryId: Id64String;\n modelId?: never;\n elementId?: never;\n}\n\n/** Arguments supplied to [[FeatureOverrides.override]].\n * @public\n */\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\n\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\n * @public\n */\nexport interface IgnoreAnimationOverridesArgs {\n /** The Id of the element under consideration.\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\n */\n readonly elementId: Readonly<Id64.Uint32Pair>;\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\n readonly animationNodeId: number;\n}\n\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\n * element should not have its color or transparency modified by the schedule script.\n * @public\n */\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\n\nconst scratchIgnoreAnimationOverridesArgs = {\n elementId: { lower: 0, upper: 0 },\n animationNodeId: 0,\n};\n\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\n * apply to the appearance of any feature not otherwise overridden.\n *\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\n * the separate overrides are combined to produce the feature's overall appearance.\n *\n * In the case of conflicts, there is an order of precedence:\n * - Model overrides take highest precedence.\n * - Element overrides are of higher precedence than subcategory and animation overrides.\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\n * - Subcategory overrides have lowest precedence.\n *\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\n *\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\n * that augments the overrides supplied by a viewport.\n *\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\n * @public\n */\nexport class FeatureOverrides implements FeatureAppearanceSource {\n /** @internal */\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\n private readonly _neverDrawn = new Id64.Uint32Set();\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\n private readonly _alwaysDrawn = new Id64.Uint32Set();\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\n * @see [[setAlwaysDrawn]]\n */\n public isAlwaysDrawnExclusive = false;\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\n * @see [[setAlwaysDrawn]]\n */\n public alwaysDrawnIgnoresSubCategory = true;\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\n */\n public ignoreSubCategory = false;\n\n /** Overrides applied to any feature not explicitly overridden. @internal */\n private _defaultOverrides = FeatureAppearance.defaults;\n /** Whether construction geometry should be drawn. */\n protected _constructions = false;\n /** Whether dimensions should be drawn. */\n protected _dimensions = false;\n /** Whether area patterns should be drawn. */\n protected _patterns = false;\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\n protected _lineWeights = true;\n\n /** Overrides applied to all elements belonging to each model. @internal */\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to specific elements. */\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to geometry belonging to each subcategory. */\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\n\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\n * Populated by Viewport.\n */\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\n\n /** Ids of animation nodes that should never be drawn. */\n public readonly neverDrawnAnimationNodes = new Set<number>();\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\n * @internal\n */\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\n\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\n *\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\n */\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\n this._ignoreAnimationOverrides.push(ignore);\n }\n\n /** Overrides applied to features for which no other overrides are defined */\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\n public get lineWeights(): boolean { return this._lineWeights; }\n\n /** A set of elements that are always invisible.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get neverDrawn() { return this._neverDrawn; }\n /** A set of elements that are unconditionally displayed.\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get alwaysDrawn() { return this._alwaysDrawn; }\n\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\n return true;\n else\n return this.neverDrawnAnimationNodes.has(animationNodeId);\n }\n\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\n if (this.ignoreSubCategory)\n return true;\n\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\n vis = !vis;\n\n return vis;\n }\n\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\n return this._modelOverrides.get(idLo, idHi);\n }\n\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n if (this.animationNodeOverrides.size === 0)\n return undefined;\n\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\n // That should be preserved.\n const app = this.animationNodeOverrides.get(animationNodeId);\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\n return app;\n\n const args = scratchIgnoreAnimationOverridesArgs;\n args.elementId.lower = idLo;\n args.elementId.upper = idHi;\n args.animationNodeId = animationNodeId;\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\n }\n\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n const elemApp = this._elementOverrides.get(idLo, idHi);\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\n if (elemApp)\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\n\n return nodeApp;\n }\n\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\n\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\n /** Specify the Id of an element that should never be drawn. */\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\n /** Specify the Id of an element that should always be drawn. */\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\n /** Specify the Id of a animation node that should never be drawn. */\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\n /** Specify the Ids of elements that should never be drawn. */\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\n /** Specify the Ids of elements that should always be drawn. */\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\n this.isAlwaysDrawnExclusive = exclusive;\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\n }\n\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\n return this.getAppearance(\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\n feature.geometryClass,\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\n type, animationNodeId);\n }\n\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\n\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\n */\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\n\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n // Is the element visible?\n let elemApp, alwaysDrawn = false;\n\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\n return undefined;\n\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\n return undefined;\n\n // Element overrides take precedence\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n }\n\n let subCatApp;\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\n return undefined;\n\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCatApp)\n app = subCatApp.extendAppearance(app);\n }\n\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\n if (visible && app.isFullyTransparent)\n visible = false; // don't bother rendering something with full transparency...\n\n return visible ? app : undefined;\n }\n\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\n let app = FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCat)\n app = subCat.extendAppearance(app);\n }\n\n if (undefined === elemApp && undefined === modelApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\n return app;\n }\n\n /** Return whether geometry of the specified class should be drawn.\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\n */\n public isClassVisible(geomClass: GeometryClass): boolean {\n switch (geomClass) {\n case GeometryClass.Construction: return this._constructions;\n case GeometryClass.Dimension: return this._dimensions;\n case GeometryClass.Pattern: return this._patterns;\n default: return true;\n }\n }\n\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\n public override(args: OverrideFeatureAppearanceArgs): void {\n let id: Id64String;\n let map: Id64.Uint32Map<FeatureAppearance>;\n if (undefined !== args.elementId) {\n id = args.elementId;\n map = this._elementOverrides;\n } else if (undefined !== args.modelId) {\n id = args.modelId;\n map = this._modelOverrides;\n } else {\n id = args.subCategoryId;\n map = this._subCategoryOverrides;\n }\n\n let app = args.appearance;\n const idLo = Id64.getLowerUint32(id);\n const idHi = Id64.getUpperUint32(id);\n\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\n return;\n\n const replace = \"replace\" === args.onConflict;\n const existing = replace ? undefined : map.get(idLo, idHi);\n if (existing) {\n assert(\"replace\" !== args.onConflict);\n switch (args.onConflict) {\n case \"skip\":\n return;\n case \"extend\":\n app = app.extendAppearance(existing);\n break;\n default:\n app = existing.extendAppearance(app);\n break;\n }\n }\n\n map.set(idLo, idHi, app);\n }\n\n /** Specify overrides for all geometry originating from the specified animation node.\n * @param id The Id of the animation node.\n * @param app The symbology overrides.\n * @note These overrides do not take precedence over element overrides.\n */\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\n this.animationNodeOverrides.set(id, app);\n }\n\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\n * @param appearance The symbology overrides.\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\n */\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\n if (replaceExisting || !appearance.overridesSymbology)\n this._defaultOverrides = appearance;\n }\n\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\n public getSubCategoryPriority(idLo: number, idHi: number): number {\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\n }\n\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\n public addInvisibleElementOverridesToNeverDrawn(): void {\n this._elementOverrides.forEach((lo, hi) => {\n const app = this.getElementOverrides(lo, hi, 0);\n if (app?.isFullyTransparent)\n this._neverDrawn.add(lo, hi);\n });\n }\n\n /** Construct a new Overrides that overrides nothing.\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\n */\n public constructor() {\n //\n }\n\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n\n /** Returns true if the specified Feature will be drawn. */\n public isFeatureVisible(feature: Feature): boolean {\n const { elementId, subCategoryId, geometryClass } = feature;\n const isValidElemId = !Id64.isInvalid(elementId);\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\n\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\n return false;\n\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\n return alwaysDrawn;\n\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\n if (!this.isSubCategoryIdVisible(subCategoryId))\n return false;\n\n return this.isClassVisible(geometryClass);\n }\n}\n\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProvider {\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** @public */\nexport namespace FeatureAppearanceProvider {\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\n return {\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\n * @public\n */\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n return app ? supplementAppearance(app) : app;\n },\n };\n }\n\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\n * @public\n */\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\n if (first === second)\n return first;\n\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FeatureSymbology.js","sourceRoot":"","sources":["../../src/FeatureSymbology.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA+D;AAC/D,iDAAoD;AAEpD,qDAAiD;AAEjD,yCAAqD;AAGrD,SAAS,oBAAoB,CAAC,GAAmB,EAAE,GAAqB;IACtE,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;SAAM,CAAC;QACN,KAAK,MAAM,EAAE,IAAI,GAAG;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AA+BD,SAAS,kBAAkB,CAAC,KAA6B;IACvD,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO;WAC9B,SAAS,KAAK,KAAK,CAAC,MAAM,IAAI,SAAS,KAAK,KAAK,CAAC,UAAU;WAC5D,SAAS,KAAK,KAAK,CAAC,YAAY,IAAI,SAAS,KAAK,KAAK,CAAC,gBAAgB;WACxE,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;AAC1E,CAAC;AAED,SAAS,QA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,CAAC,KAAgC,EAAE,MAAiC;QACvF,IAAI,KAAK,KAAK,MAAM;YAClB,OAAO,KAAK,CAAC;QAEf,OAAO;YACL,oBAAoB,EAAE,CAAC,MAA+B,EAAE,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,QAAgB,EAAE,SAAwB,EAAE,OAAe,EAAE,OAAe,EAAE,IAAe,EAAE,eAAuB,EAAE,EAAE;gBAClO,OAAO,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;YAClJ,CAAC;SACF,CAAC;IACJ,CAAC;IATe,+BAAK,QASpB,CAAA;AACH,CAAC,EArCgB,yBAAyB,yCAAzB,yBAAyB,QAqCzC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { BatchType, Feature } from \"./FeatureTable\";\nimport { ColorDef } from \"./ColorDef\";\nimport { GeometryClass } from \"./GeometryParams\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\nimport { SubCategoryOverride } from \"./SubCategoryOverride\";\n\nfunction copyIdSetToUint32Set(dst: Id64.Uint32Set, src: Iterable<string>): void {\n dst.clear();\n if (typeof src === \"string\") {\n dst.addId(src);\n } else {\n for (const id of src)\n dst.addId(id);\n }\n}\n\n// cspell:ignore subcat subcats\n\n/** JSON representation of a [[FeatureAppearance]].\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProps {\n /** See [[FeatureAppearance.rgb]]. */\n rgb?: RgbColorProps;\n /** See [[FeatureAppearance.lineRgb]]. */\n lineRgb?: RgbColorProps | false;\n /** See [[FeatureAppearance.weight]]. */\n weight?: number;\n /** See [[FeatureAppearance.transparency]]. */\n transparency?: number;\n /** See [[FeatureAppearance.lineTransparency]]. */\n lineTransparency?: number | false;\n /** See [[FeatureAppearance.viewDependentTransparency]]. */\n viewDependentTransparency?: true;\n /** See [[FeatureAppearance.linePixels]]. */\n linePixels?: LinePixels;\n /** See [[FeatureAppearance.ignoresMaterial]]. */\n ignoresMaterial?: true;\n /** See [[FeatureAppearance.nonLocatable]]. */\n nonLocatable?: true;\n /** See [[FeatureAppearance.emphasized]]. */\n emphasized?: true;\n}\n\nfunction propsMatchDefaults(props: FeatureAppearanceProps): boolean {\n return !props.rgb && !props.lineRgb\n && undefined === props.weight && undefined === props.linePixels\n && undefined === props.transparency && undefined === props.lineTransparency\n && !props.ignoresMaterial && !props.nonLocatable && !props.emphasized;\n}\n\nfunction equalRgb(a: RgbColor | undefined, b: RgbColor | undefined): boolean {\n if (a === b) {\n return true;\n } else if (!a || !b) {\n return false;\n } else {\n return a.equals(b);\n }\n}\n\nfunction equalLineRgb(a: RgbColor | false | undefined, b: RgbColor | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (a instanceof RgbColor && b instanceof RgbColor) {\n return equalRgb(a, b);\n } else {\n return false;\n }\n}\n\nfunction equalTransparency(a: number | undefined, b: number | undefined): boolean {\n if (a === b) {\n return true;\n } else if (undefined === a || undefined === b) {\n return false;\n } else {\n return Math.floor(a * 0xff) === Math.floor(b * 0xff);\n }\n}\n\nfunction equalLineTransparency(a: number | false | undefined, b: number | false | undefined): boolean {\n if (a === b) {\n return true;\n } else if (typeof a === \"number\" && typeof b === \"number\") {\n return equalTransparency(a, b);\n } else {\n assert(a === undefined || a === false);\n assert(b === undefined || b === false);\n return false;\n }\n}\n\nfunction transparencyFromJSON(transp: number | undefined): number | undefined {\n if (undefined === transp) {\n return undefined;\n }\n\n transp = Math.max(0, Math.min(transp, 1));\n\n // Fix up rounding errors...\n const smallDelta = 0.0001;\n if (1.0 - transp < smallDelta) {\n transp = 1.0;\n } else if (transp < smallDelta) {\n transp = 0.0;\n }\n\n return transp;\n}\n\n/** Defines overrides for selected aspects of a [[Feature]]'s symbology.\n * Any member defined in the appearance overrides that aspect of symbology for all [[Feature]]s to which the appearance is applied.\n *\n * The [[rgb]] and [[transparency]] overrides, if defined, apply to all geometry by default.\n * However, the color and transparency of \"linear\" geometry can optionally be controlled independently from the rest of the geometry via [[lineRgb]] and [[lineTransparency]].\n * Linear geometry consists of any of the following:\n * - Curves and line strings;\n * - Points and point strings; and\n * - The outlines of planar regions.\n * The edges of 3d surfaces like spheres are not considered linear geometry.\n *\n * @see [[FeatureOverrides]] to customize the appearance of multiple features.\n * @public\n */\nexport class FeatureAppearance {\n /** Overrides the feature's color.\n * If [[lineRgb]] is `undefined`, this color also applies to linear geometry.\n */\n public readonly rgb?: RgbColor;\n /** If defined, overrides the color of linear geometry independently of [[rgb]].\n * If `false`, linear geometry draws using its normal color; otherwise, it uses the specified color.\n */\n public readonly lineRgb?: RgbColor | false;\n /** The width of lines and edges in pixels as an integer in [1, 31]. */\n public readonly weight?: number;\n /** The transparency in the range [0, 1] where 0 indicates fully opaque and 1 indicates fully transparent.\n * If [[lineTransparency]] is `undefined`, this transparency also applies to linear geometry.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly transparency?: number;\n /** If defined, overrides the transparency of linear geometry independently of [[transparency]].\n * If `false`, linear geometry draws using its normal transparency; otherwise, it uses the specified transparency.\n * @see [[viewDependentTransparency]] for details on how this override interacts with the [DisplayStyle]($backend).\n */\n public readonly lineTransparency?: number | false;\n /** The pixel pattern applied to lines and edges. */\n public readonly linePixels?: LinePixels;\n /** If true, don't apply the [[RenderMaterial]] to the feature's surfaces. */\n public readonly ignoresMaterial?: true;\n /** If true, the feature will not be drawn when using [Viewport.readPixels]($frontend), meaning [Tool]($frontend)s will not be able to interact with it. */\n public readonly nonLocatable?: true;\n /** If true, the feature will be rendered using the [[Hilite.Settings]] defined by [Viewport.emphasisSettings]($frontend) to make it stand out. */\n public readonly emphasized?: true;\n /** If true, then [[transparency]] and/or [[lineTransparency]] will only be applied if [[ViewFlags.transparency]] is enabled and the current [[RenderMode]] supports transparency.\n * Default: false, meaning the transparency will be applied regardless of view flags or render mode.\n * This property has no effect if this appearance does not override transparency.\n */\n public readonly viewDependentTransparency?: true;\n\n /** An appearance that overrides nothing. */\n public static readonly defaults = new FeatureAppearance({});\n\n public static fromJSON(props?: FeatureAppearanceProps) {\n if (!props || propsMatchDefaults(props)) {\n return this.defaults;\n }\n\n return new FeatureAppearance(props);\n }\n\n /** Create a FeatureAppearance that overrides only the RGB color.\n * @note The transparency component of the ColorDef is ignored.\n */\n public static fromRgb(color: ColorDef): FeatureAppearance {\n return new FeatureAppearance({ rgb: RgbColor.fromColorDef(color) });\n }\n\n /** Create a FeatureAppearance that overrides the RGB and transparency.\n * The appearance's transparency is derived from the transparency component of the ColorDef.\n */\n public static fromRgba(color: ColorDef, viewDependentTransparency = false): FeatureAppearance {\n return new FeatureAppearance({\n rgb: RgbColor.fromColorDef(color),\n transparency: color.colors.t / 255,\n viewDependentTransparency: viewDependentTransparency ? true : undefined,\n });\n }\n /** Create a FeatureAppearance that overrides only the transparency */\n public static fromTransparency(transparencyValue: number, viewDependent = false): FeatureAppearance {\n return new FeatureAppearance({\n transparency: transparencyValue,\n viewDependentTransparency: viewDependent ? true : undefined,\n });\n }\n\n /** Create a FeatureAppearance with overrides corresponding to those defined by the supplied SubCategoryOverride.\n * @note Subcategory overrides set [[viewDependentTransparency]] to `true`.\n */\n public static fromSubCategoryOverride(ovr: SubCategoryOverride): FeatureAppearance {\n const rgb = undefined !== ovr.color ? RgbColor.fromColorDef(ovr.color) : undefined;\n const transparency = ovr.transparency;\n const weight = ovr.weight;\n const ignoresMaterial = undefined !== ovr.material && Id64.isValid(ovr.material) ? true : undefined;\n return this.fromJSON({ rgb, transparency, weight, ignoresMaterial, viewDependentTransparency: true });\n }\n\n /** Returns true if this appearance does not override any aspects of symbology. */\n public get matchesDefaults(): boolean {\n return this.equals(FeatureAppearance.defaults);\n }\n\n public get overridesRgb(): boolean { return undefined !== this.rgb; }\n public get overridesTransparency(): boolean { return undefined !== this.transparency; }\n public get overridesLinePixels(): boolean { return undefined !== this.linePixels; }\n public get overridesWeight(): boolean { return undefined !== this.weight; }\n\n /** Get the color that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[rgb]] if [[lineRgb]] is `undefined`.\n */\n public getLineRgb(): RgbColor | undefined {\n return false !== this.lineRgb ? (this.lineRgb ?? this.rgb) : undefined;\n }\n\n /** Get the transparency that will be applied to linear geometry, or undefined if not overridden.\n * This is the same as [[transparency]] if [[lineTransparency]] is `undefined`.\n */\n public getLineTransparency(): number | undefined {\n return false !== this.lineTransparency ? (this.lineTransparency ?? this.transparency) : undefined;\n }\n\n public get overridesSymbology(): boolean {\n return this.overridesRgb || this.overridesTransparency || this.overridesWeight || this.overridesLinePixels || !!this.ignoresMaterial\n || this.emphasized || this.overridesNonLocatable\n || undefined !== this.getLineRgb() || undefined !== this.getLineTransparency();\n }\n\n public get overridesNonLocatable(): boolean { return undefined !== this.nonLocatable; }\n\n public get isFullyTransparent(): boolean {\n const surf = this.transparency ?? 0;\n const line = this.getLineTransparency() ?? 0;\n return surf >= 1 && line >= 1;\n }\n\n /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */\n public get anyOverridden(): boolean { return this.overridesSymbology || this.overridesNonLocatable; }\n\n public equals(other: FeatureAppearance): boolean {\n if (this === other)\n return true;\n\n return equalRgb(this.rgb, other.rgb)\n && this.weight === other.weight\n && equalTransparency(this.transparency, other.transparency)\n && this.linePixels === other.linePixels\n && this.ignoresMaterial === other.ignoresMaterial\n && this.nonLocatable === other.nonLocatable\n && this.emphasized === other.emphasized\n && this.viewDependentTransparency === other.viewDependentTransparency\n && equalLineTransparency(this.lineTransparency, other.lineTransparency)\n && equalLineRgb(this.lineRgb, other.lineRgb);\n }\n\n public toJSON(): FeatureAppearanceProps {\n const props: FeatureAppearanceProps = {};\n if (this.rgb)\n props.rgb = this.rgb.toJSON();\n\n if (undefined !== this.weight)\n props.weight = this.weight;\n\n if (undefined !== this.transparency) {\n props.transparency = this.transparency;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n if (undefined !== this.linePixels)\n props.linePixels = this.linePixels;\n\n if (true === this.ignoresMaterial)\n props.ignoresMaterial = true;\n\n if (true === this.nonLocatable)\n props.nonLocatable = true;\n\n if (true === this.emphasized)\n props.emphasized = true;\n\n if (undefined !== this.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.lineRgb) {\n props.lineRgb = this.lineRgb;\n if (this.viewDependentTransparency)\n props.viewDependentTransparency = true;\n }\n\n return props;\n }\n\n /** Convert this appearance to JSON, and override any properties explicitly specified by `changedProps` in the result.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.cloneProps({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.clone]].\n */\n public cloneProps(changedProps: FeatureAppearanceProps): FeatureAppearanceProps {\n return {\n ...this.toJSON(),\n ...changedProps,\n };\n }\n\n /** Create a copy of this appearance, overriding any properties explicitly specified by `changedProps`.\n * Example:\n * ```ts\n * const base = FeatureAppearance.fromRgba(ColorDef.white); // transparency=0, rgb=white\n * const clone = base.clone({ transparency: undefined, weight: 5 }); // transparency=undefined, rgb=white, weight=5\n * ```\n * @see [[FeatureAppearance.cloneProps]].\n */\n public clone(changedProps: FeatureAppearanceProps): FeatureAppearance {\n return FeatureAppearance.fromJSON(this.cloneProps(changedProps));\n }\n\n /** Produce a FeatureAppearance from the supplied appearance in which any aspect not defined by the base appearance is overridden by this appearance. */\n public extendAppearance(base: FeatureAppearance): FeatureAppearance {\n if (!this.overridesSymbology)\n return base;\n\n const props = base.toJSON();\n if (undefined === props.rgb)\n props.rgb = this.rgb;\n if (undefined === props.transparency)\n props.transparency = this.transparency;\n if (undefined === props.linePixels)\n props.linePixels = this.linePixels;\n if (undefined === props.weight)\n props.weight = this.weight;\n if (undefined === props.ignoresMaterial && this.ignoresMaterial)\n props.ignoresMaterial = true;\n if (undefined === props.nonLocatable && this.nonLocatable)\n props.nonLocatable = true;\n if (undefined === props.emphasized && this.emphasized)\n props.emphasized = true;\n if (!props.lineRgb)\n props.lineRgb = this.lineRgb;\n if (undefined === props.lineTransparency)\n props.lineTransparency = this.lineTransparency;\n\n if (this.viewDependentTransparency && (undefined !== props.transparency || undefined !== props.lineTransparency))\n props.viewDependentTransparency = true;\n\n return FeatureAppearance.fromJSON(props);\n }\n\n protected constructor(props: FeatureAppearanceProps) {\n this.rgb = undefined !== props.rgb ? RgbColor.fromJSON(props.rgb) : undefined;\n this.lineRgb = typeof props.lineRgb === \"object\" ? RgbColor.fromJSON(props.lineRgb) : (false === props.lineRgb ? false : undefined);\n\n this.transparency = transparencyFromJSON(props.transparency);\n this.lineTransparency = typeof props.lineTransparency === \"number\" ? transparencyFromJSON(props.lineTransparency) : (false === props.lineTransparency ? false : undefined);\n\n this.weight = props.weight;\n this.linePixels = props.linePixels;\n\n this.ignoresMaterial = props.ignoresMaterial;\n this.nonLocatable = props.nonLocatable;\n this.emphasized = props.emphasized;\n\n if (undefined !== this.weight) {\n this.weight = Math.max(1, Math.min(this.weight, 32));\n }\n\n if (props.viewDependentTransparency && (undefined !== this.transparency || undefined !== this.getLineTransparency())) {\n this.viewDependentTransparency = true;\n }\n }\n}\n\n/** Interface adopted by an object that can supply a [[FeatureAppearance]] given a low-level description of a [[Feature]].\n * @see [[FeatureOverrides]] for the commonly-used implementation.\n * @see [[FeatureAppearanceProvider]] to supplement the appearance supplied by this interface.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceSource {\n /** Supplies the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** Common options for [[FeatureOverrides.override]].\n * @public\n */\nexport interface OverrideFeatureAppearanceOptions {\n /** Specifies the aspects of the [[Feature]]'s appearance to be overridden. */\n appearance: FeatureAppearance;\n /** Specifies what to do if a [[FeatureAppearance]] has already been configured for the specified element, model, or subcategory by a previous call to [[FeatureOverrides.override]].\n * - \"subsume\" (the default): Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by the existing appearance will be overwritten\n * if also overridden by [[appearance]].\n * - The resulting appearance is computed as `existingAppearance.extendAppearance(newAppearance)`.\n * - \"extend\": Merge the two appearances using the logic described by [[FeatureAppearance.extendAppearance]] such that any aspect overridden by [[appearance]] will only\n * apply if that aspect is not already overridden by a previous appearance.\n * - The resulting appearance is computed as `newAppearance.extendAppearance(existingAppearance)`.\n * - \"replace\": Completely replace the existing appearance with [[appearance]].\n * - \"skip\": Keep the existing appearance.\n */\n onConflict?: \"extend\" | \"subsume\" | \"replace\" | \"skip\";\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricModel]($backend).\n * @public\n */\nexport interface OverrideModelAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the model whose appearance is to be overridden. */\n modelId: Id64String;\n elementId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [GeometricElement]($backend).\n * @public\n */\nexport interface OverrideElementAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the element whose appearance is to be overridden. */\n elementId: Id64String;\n modelId?: never;\n subCategoryId?: never;\n}\n\n/** Options for using [[FeatureOverrides.override]] to override the appearance of a [SubCategory]($backend).\n * @public\n */\nexport interface OverrideSubCategoryAppearanceOptions extends OverrideFeatureAppearanceOptions {\n /** The Id of the subcategory whose appearance is to be overridden. */\n subCategoryId: Id64String;\n modelId?: never;\n elementId?: never;\n}\n\n/** Arguments supplied to [[FeatureOverrides.override]].\n * @public\n */\nexport type OverrideFeatureAppearanceArgs = OverrideElementAppearanceOptions | OverrideModelAppearanceOptions | OverrideSubCategoryAppearanceOptions;\n\n/** Arguments provided to a function of type [[IgnoreAnimationOverrides]].\n * @see [[FeatureOverrides.ignoreAnimationOverrides]] to register such a function.\n * @public\n */\nexport interface IgnoreAnimationOverridesArgs {\n /** The Id of the element under consideration.\n * @see [Id64.fromUint32Pair]($bentley) to convert a Uint32Pair into an [Id64String]($bentley), if needed.\n */\n readonly elementId: Readonly<Id64.Uint32Pair>;\n /** The [[RenderSchedule.ElementTimeline.batchId]] identifying the [[RenderSchedule.ElementTimeline]] to which the element under consideration belongs. */\n readonly animationNodeId: number;\n}\n\n/** A function that can be supplied to [[FeatureOverrides.ignoreAnimationOverrides]] to indicate whether the color or transparency overrides defined\n * by the view's [[RenderSchedule.Script]] should be ignored. The arguments describe the element under consideration. The function should return true if that\n * element should not have its color or transparency modified by the schedule script.\n * @public\n */\nexport type IgnoreAnimationOverrides = (args: IgnoreAnimationOverridesArgs) => boolean;\n\nconst scratchIgnoreAnimationOverridesArgs = {\n elementId: { lower: 0, upper: 0 },\n animationNodeId: 0,\n};\n\n/** Specifies how to customize the appearance of individual [[Feature]]s, typically within the context of a [Viewport]($frontend).\n * Individual aspects of a feature's appearance - like visibility, color, and transparency - are overridden by supplying a [[FeatureAppearance]].\n * Those overrides can be specified on the basis of the feature's model, element, and/or subcategory. A default set of overrides can also be specified to\n * apply to the appearance of any feature not otherwise overridden.\n *\n * It is possible to override multiple aspects of a feature on different bases. For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red,\n * and that all features belonging to model \"B\" should be drawn 50% transparent. In this case, a feature belonging to both subcategory \"A\" and model \"B\" will be drawn as 50% transparent red -\n * the separate overrides are combined to produce the feature's overall appearance.\n *\n * In the case of conflicts, there is an order of precedence:\n * - Model overrides take highest precedence.\n * - Element overrides are of higher precedence than subcategory and animation overrides.\n * - Overrides applied by a [[RenderSchedule.Script]]'s [[RenderSchedule.ElementTimeline]] are of higher precedence than subcategory overrides, but can be suppressed on a per-element basis via [[ignoreAnimationOverrides]].\n * - Subcategory overrides have lowest precedence.\n *\n * For example, you might specify that all features belonging to subcategory \"A\" should be drawn in red, and all those belonging to model \"B\" should be drawn in green.\n * Then a feature belonging to subcategory \"A\" and model \"B\" will be drawn in green, because the model overrides take precedence.\n *\n * Instances of this class are not typically instantiated by an application directly; instead, an application can implement a [FeatureOverrideProvider]($frontend)\n * that augments the overrides supplied by a viewport.\n *\n * @see [FeatureSymbology.Overrides]($frontend) to create overrides specific to a [Viewport]($frontend) or [ViewState]($frontend).\n * @see [FeatureOverrideProvider]($frontend) to customize the appearance of features within a [Viewport]($frontend).\n * @public\n */\nexport class FeatureOverrides implements FeatureAppearanceSource {\n /** @internal */\n private readonly _ignoreAnimationOverrides: IgnoreAnimationOverrides[] = [];\n /** Ids of elements that should never be drawn. This takes precedence over [[alwaysDrawn]]. @internal */\n private readonly _neverDrawn = new Id64.Uint32Set();\n /** Ids of elements that should always be drawn. [[neverDrawn]] takes precedence over this set. @internal */\n private readonly _alwaysDrawn = new Id64.Uint32Set();\n /** If true, no elements *except* those defined in the \"always drawn\" set will be drawn.\n * @see [[setAlwaysDrawn]]\n */\n public isAlwaysDrawnExclusive = false;\n /** If true, the always-drawn elements are drawn even if their subcategories are not visible.\n * @see [[setAlwaysDrawn]]\n */\n public alwaysDrawnIgnoresSubCategory = true;\n /** If true, all subcategories are considered visible. This is used for drawing sheets via section callouts in the absence of an actual sheet view.\n */\n public ignoreSubCategory = false;\n\n /** Overrides applied to any feature not explicitly overridden. @internal */\n private _defaultOverrides = FeatureAppearance.defaults;\n /** Whether construction geometry should be drawn. */\n protected _constructions = false;\n /** Whether dimensions should be drawn. */\n protected _dimensions = false;\n /** Whether area patterns should be drawn. */\n protected _patterns = false;\n /** Whether line weights should be applied. If false, all lines are rendered 1-pixel wide. */\n protected _lineWeights = true;\n\n /** Overrides applied to all elements belonging to each model. @internal */\n private readonly _modelOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to specific elements. */\n protected readonly _elementOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** Overrides applied to geometry belonging to each subcategory. */\n protected readonly _subCategoryOverrides = new Id64.Uint32Map<FeatureAppearance>();\n /** The set of displayed subcategories. Geometry belonging to subcategories not included in this set will not be drawn. */\n protected readonly _visibleSubCategories = new Id64.Uint32Set();\n /** Display priorities assigned to subcategories, possibly overridden by display style. Only applicable for plan projection models. */\n protected readonly _subCategoryPriorities = new Id64.Uint32Map<number>();\n\n /** Per-model, a set of subcategories whose visibility should be inverted for elements within that model.\n * Populated by Viewport.\n */\n protected readonly _modelSubCategoryOverrides = new Id64.Uint32Map<Id64.Uint32Set>();\n\n /** Ids of animation nodes that should never be drawn. */\n public readonly neverDrawnAnimationNodes = new Set<number>();\n /** Mapping of animation node Ids to overrides applied to the corresponding animation nodes.\n * @internal\n */\n public readonly animationNodeOverrides = new Map<number, FeatureAppearance>();\n\n /** Accepts a criterion that determines whether color and transparency overrides originating from the view's [[RenderSchedule.Script]] should be ignored for a given element.\n * The function receives a description of the element in question and returns `true` if the script's overrides should be ignored.\n * Any number of such functions can be registered; if any one of them returns `true`, the script's overrides are not applied to the specified element.\n *\n * For example, applications commonly emphasize a set of elements by applying a [[FeatureAppearance.emphasized]] override to them, and specifying a highly-transparent\n * default appearance to de-emphasize the rest of the elements in the view. If some of the de-emphasized elements' appearances are also being overridden by the schedule script, then\n * they won't appear de-emphasized, making it difficult for the emphasized elements to stand out. In situations like this, [FeatureOverrideProvider]($frontend)s like [EmphasizeElements]($frontend) can register an [[IgnoreAnimationOverrides]] function that returns true if the element in question is not in the set of emphasized elements.\n */\n public ignoreAnimationOverrides(ignore: IgnoreAnimationOverrides): void {\n this._ignoreAnimationOverrides.push(ignore);\n }\n\n /** Overrides applied to features for which no other overrides are defined */\n public get defaultOverrides(): FeatureAppearance { return this._defaultOverrides; }\n /** Whether or not line weights are applied. If false, all lines are drawn with a weight of 1. */\n public get lineWeights(): boolean { return this._lineWeights; }\n\n /** A set of elements that are always invisible.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get neverDrawn() { return this._neverDrawn; }\n /** A set of elements that are unconditionally displayed.\n * @see [[isAlwaysDrawnExclusive]] to specify that *only* elements in this set will be displayed.\n * @note If an element is present in both `alwaysDrawn` and [[neverDrawn]], it will not be displayed - `neverDrawn` takes precedence.\n */\n public get alwaysDrawn() { return this._alwaysDrawn; }\n\n private isNeverDrawn(elemIdLo: number, elemIdHi: number, animationNodeId: number): boolean {\n if (this._neverDrawn.has(elemIdLo, elemIdHi))\n return true;\n else\n return this.neverDrawnAnimationNodes.has(animationNodeId);\n }\n\n private isAlwaysDrawn(idLo: number, idHi: number): boolean { return this._alwaysDrawn.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories. */\n public isSubCategoryVisible(idLo: number, idHi: number): boolean { return this._visibleSubCategories.has(idLo, idHi); }\n\n /** Returns true if the [SubCategory]($backend) specified by Id is in the set of visible subcategories in the context of the specified model. */\n public isSubCategoryVisibleInModel(subcatLo: number, subcatHi: number, modelLo: number, modelHi: number): boolean {\n if (this.ignoreSubCategory)\n return true;\n\n let vis = this.isSubCategoryVisible(subcatLo, subcatHi);\n const modelOvr = this._modelSubCategoryOverrides.get(modelLo, modelHi);\n if (undefined !== modelOvr && modelOvr.has(subcatLo, subcatHi))\n vis = !vis;\n\n return vis;\n }\n\n private getModelOverrides(idLo: number, idHi: number): FeatureAppearance | undefined {\n return this._modelOverrides.get(idLo, idHi);\n }\n\n private getElementAnimationOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n if (this.animationNodeOverrides.size === 0)\n return undefined;\n\n // NB: An animation node Id of zero means \"not animated\". Some providers like EmphasizeElements may provide an appearance override for unanimated nodes.\n // That should be preserved.\n const app = this.animationNodeOverrides.get(animationNodeId);\n if (!app || 0 === animationNodeId || this._ignoreAnimationOverrides.length === 0)\n return app;\n\n const args = scratchIgnoreAnimationOverridesArgs;\n args.elementId.lower = idLo;\n args.elementId.upper = idHi;\n args.animationNodeId = animationNodeId;\n return this._ignoreAnimationOverrides.some((ignore) => ignore(args)) ? undefined : app;\n }\n\n private getElementOverrides(idLo: number, idHi: number, animationNodeId: number): FeatureAppearance | undefined {\n const elemApp = this._elementOverrides.get(idLo, idHi);\n const nodeApp = this.getElementAnimationOverrides(idLo, idHi, animationNodeId);\n if (elemApp)\n return nodeApp ? nodeApp.extendAppearance(elemApp) : elemApp;\n\n return nodeApp;\n }\n\n private getSubCategoryOverrides(idLo: number, idHi: number): FeatureAppearance | undefined { return this._subCategoryOverrides.get(idLo, idHi); }\n\n /** Add a [SubCategory]($backend) to the set of visible subcategories. */\n public setVisibleSubCategory(id: Id64String): void { this._visibleSubCategories.addId(id); }\n /** Specify the Id of an element that should never be drawn. */\n public setNeverDrawn(id: Id64String): void { this._neverDrawn.addId(id); }\n /** Specify the Id of an element that should always be drawn. */\n public setAlwaysDrawn(id: Id64String): void { this._alwaysDrawn.addId(id); }\n /** Specify the Id of a animation node that should never be drawn. */\n public setAnimationNodeNeverDrawn(id: number): void { this.neverDrawnAnimationNodes.add(id); }\n /** Specify the Ids of elements that should never be drawn. */\n public setNeverDrawnSet(ids: Iterable<Id64String>) { copyIdSetToUint32Set(this._neverDrawn, ids); }\n /** Specify the Ids of elements that should always be drawn. */\n public setAlwaysDrawnSet(ids: Iterable<Id64String>, exclusive: boolean, ignoreSubCategory = true) {\n copyIdSetToUint32Set(this._alwaysDrawn, ids);\n this.isAlwaysDrawnExclusive = exclusive;\n this.alwaysDrawnIgnoresSubCategory = ignoreSubCategory;\n }\n\n /** Returns the feature's appearance overrides, or undefined if the feature is not visible. */\n public getFeatureAppearance(feature: Feature, modelId: Id64String, type: BatchType = BatchType.Primary, animationNodeId = 0): FeatureAppearance | undefined {\n return this.getAppearance(\n Id64.getLowerUint32(feature.elementId), Id64.getUpperUint32(feature.elementId),\n Id64.getLowerUint32(feature.subCategoryId), Id64.getUpperUint32(feature.subCategoryId),\n feature.geometryClass,\n Id64.getLowerUint32(modelId), Id64.getUpperUint32(modelId),\n type, animationNodeId);\n }\n\n private static readonly _weight1Appearance = FeatureAppearance.fromJSON({ weight: 1 });\n\n /** Returns a feature's appearance overrides, or undefined if the feature is not visible.\n * Takes Id64s as pairs of unsigned 32-bit integers for efficiency, because that is how they are stored by the PackedFeatureTable associated with each batch of graphics.\n * @see [[getFeatureAppearance]] for an equivalent function that accepts [Id64String]($core-bentley)s instead of integer pairs.\n */\n public getAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined {\n if (BatchType.VolumeClassifier === type || BatchType.PlanarClassifier === type)\n return this.getClassifierAppearance(elemLo, elemHi, subcatLo, subcatHi, modelLo, modelHi, animationNodeId);\n\n let app = !this._lineWeights ? FeatureOverrides._weight1Appearance : FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n // Is the element visible?\n let elemApp, alwaysDrawn = false;\n\n if (Id64.isValidUint32Pair(elemLo, elemHi)) {\n if (this.isNeverDrawn(elemLo, elemHi, animationNodeId))\n return undefined;\n\n alwaysDrawn = this.isAlwaysDrawn(elemLo, elemHi);\n if (!alwaysDrawn && this.isAlwaysDrawnExclusive)\n return undefined;\n\n // Element overrides take precedence\n elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n }\n\n let subCatApp;\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n if ((!alwaysDrawn || !this.alwaysDrawnIgnoresSubCategory) && !this.isSubCategoryVisibleInModel(subcatLo, subcatHi, modelLo, modelHi))\n return undefined;\n\n subCatApp = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCatApp)\n app = subCatApp.extendAppearance(app);\n }\n\n // Only apply default if *no* appearance was explicitly registered (doesn't matter if registered appearance does not actually override anything)\n if (undefined === elemApp && undefined === modelApp && undefined === subCatApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n let visible = alwaysDrawn || this.isClassVisible(geomClass);\n if (visible && app.isFullyTransparent)\n visible = false; // don't bother rendering something with full transparency...\n\n return visible ? app : undefined;\n }\n\n /** Classifiers behave totally differently...in particular they are never invisible unless fully-transparent. */\n private getClassifierAppearance(elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, modelLo: number, modelHi: number, animationNodeId: number): FeatureAppearance | undefined {\n let app = FeatureAppearance.defaults;\n const modelApp = this.getModelOverrides(modelLo, modelHi);\n if (undefined !== modelApp)\n app = modelApp.extendAppearance(app);\n\n const elemApp = this.getElementOverrides(elemLo, elemHi, animationNodeId);\n if (undefined !== elemApp)\n app = undefined !== modelApp ? elemApp.extendAppearance(app) : elemApp;\n\n if (!this.ignoreSubCategory && Id64.isValidUint32Pair(subcatLo, subcatHi)) {\n const subCat = this.getSubCategoryOverrides(subcatLo, subcatHi);\n if (undefined !== subCat)\n app = subCat.extendAppearance(app);\n }\n\n if (undefined === elemApp && undefined === modelApp)\n app = this._defaultOverrides.extendAppearance(app);\n\n // NB: A fully-transparent classifier means the classifier is a clip mask - classified pixels will be discarded.\n return app;\n }\n\n /** Return whether geometry of the specified class should be drawn.\n * @see [[ViewFlags.constructions]], [[ViewFlags.dimensions]], and [[ViewFlags.patterns]].\n */\n public isClassVisible(geomClass: GeometryClass): boolean {\n switch (geomClass) {\n case GeometryClass.Construction: return this._constructions;\n case GeometryClass.Dimension: return this._dimensions;\n case GeometryClass.Pattern: return this._patterns;\n default: return true;\n }\n }\n\n /** Specify overrides for all elements belonging to a specified [GeometricModel]($backend), or all geometry belonging to a specified [GeometricElement]($backend) or [SubCategory]($backend). */\n public override(args: OverrideFeatureAppearanceArgs): void {\n let id: Id64String;\n let map: Id64.Uint32Map<FeatureAppearance>;\n if (undefined !== args.elementId) {\n id = args.elementId;\n map = this._elementOverrides;\n } else if (undefined !== args.modelId) {\n id = args.modelId;\n map = this._modelOverrides;\n } else {\n id = args.subCategoryId;\n map = this._subCategoryOverrides;\n }\n\n let app = args.appearance;\n const idLo = Id64.getLowerUint32(id);\n const idHi = Id64.getUpperUint32(id);\n\n if (undefined !== args.elementId && this.isNeverDrawn(idLo, idHi, 0))\n return;\n\n const replace = \"replace\" === args.onConflict;\n const existing = replace ? undefined : map.get(idLo, idHi);\n if (existing) {\n assert(\"replace\" !== args.onConflict);\n switch (args.onConflict) {\n case \"skip\":\n return;\n case \"extend\":\n app = app.extendAppearance(existing);\n break;\n default:\n app = existing.extendAppearance(app);\n break;\n }\n }\n\n map.set(idLo, idHi, app);\n }\n\n /** Specify overrides for all geometry originating from the specified animation node.\n * @param id The Id of the animation node.\n * @param app The symbology overrides.\n * @note These overrides do not take precedence over element overrides.\n */\n public overrideAnimationNode(id: number, app: FeatureAppearance): void {\n this.animationNodeOverrides.set(id, app);\n }\n\n /** Defines a default appearance to be applied to any [[Feature]] *not* explicitly overridden.\n * @param appearance The symbology overrides.\n * @param replaceExisting Specifies whether to replace the current default overrides if they are already defined.\n */\n public setDefaultOverrides(appearance: FeatureAppearance, replaceExisting: boolean = true): void {\n if (replaceExisting || !appearance.overridesSymbology)\n this._defaultOverrides = appearance;\n }\n\n /** Get the display priority of a subcategory. This is only relevant when using [[PlanProjectionSettings]]. */\n public getSubCategoryPriority(idLo: number, idHi: number): number {\n return this._subCategoryPriorities.get(idLo, idHi) ?? 0;\n }\n\n /** Adds all fully transparent elements to the _neverDrawn set. This is used for BatchedModels planar masks. */\n public addInvisibleElementOverridesToNeverDrawn(): void {\n this._elementOverrides.forEach((lo, hi) => {\n const app = this.getElementOverrides(lo, hi, 0);\n if (app?.isFullyTransparent)\n this._neverDrawn.add(lo, hi);\n });\n }\n\n /** Construct a new Overrides that overrides nothing.\n * @see [FeatureSymbology.Overrides]($frontend) to construct overrides based on a [ViewState]($frontend) or [Viewport]($frontend).\n */\n public constructor() {\n //\n }\n\n /** Returns true if geometry belonging to the specified subcategory will be drawn. */\n public isSubCategoryIdVisible(id: Id64String): boolean { return this.isSubCategoryVisible(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified model, if any such are defined. */\n public getModelOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getModelOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n /** Returns the overrides applied to geometry belonging to the specified element, if any such are defined. */\n public getElementOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getElementOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id), 0); }\n /** Returns the overrides applied to geometry belonging to the specified subcategory, if any such are defined. */\n public getSubCategoryOverridesById(id: Id64String): FeatureAppearance | undefined { return this.getSubCategoryOverrides(Id64.getLowerUint32(id), Id64.getUpperUint32(id)); }\n\n /** Returns true if the specified Feature will be drawn. */\n public isFeatureVisible(feature: Feature): boolean {\n const { elementId, subCategoryId, geometryClass } = feature;\n const isValidElemId = !Id64.isInvalid(elementId);\n const elemIdParts = isValidElemId ? Id64.getUint32Pair(elementId) : undefined;\n\n if (undefined !== elemIdParts && this.isNeverDrawn(elemIdParts.lower, elemIdParts.upper, 0))\n return false;\n\n const alwaysDrawn = undefined !== elemIdParts && this.isAlwaysDrawn(elemIdParts.lower, elemIdParts.upper);\n if (alwaysDrawn || this.isAlwaysDrawnExclusive)\n return alwaysDrawn;\n\n // NB: This ignores per-model subcategory visibility overrides, because caller did not specify a model.\n if (!this.isSubCategoryIdVisible(subCategoryId))\n return false;\n\n return this.isClassVisible(geometryClass);\n }\n}\n\n/** Interface adopted by an object that can supply the [[FeatureAppearance]] supplied by a [[FeatureAppearanceSource]].\n * This is useful for selectively overriding or agumenting a [Viewport]($frontend)'s symbology overrides.\n * A typical implementation will invoke [[FeatureAppearanceSource.getAppearance]] and customize the returned appearance.\n * @see [[FeatureAppearanceProvider.chain]] to chain two providers together.\n * @public\n * @extensions\n */\nexport interface FeatureAppearanceProvider {\n /** Supply the desired appearance overrides for the specified [[Feature]], or `undefined` if the feature should not be drawn.\n * The feature is described by its components for efficiency reasons.\n * @param source The base symbology overrides, e.g., typically defined by a [Viewport]($frontend).\n * @param elemLo The lower 32 bits of the feature's element Id.\n * @param elemHi The upper 32 bits of the feature's element Id.\n * @param subcatLo The lower 32 bits of the feature's subcategory Id.\n * @param subcatHi The upper 32 bits of the feature's subcategory Id.\n * @param geomClass The geometry class of the feature.\n * @param modelLo The lower 32 bits of the feature's model Id.\n * @param modelHi The upper 32 bits of the feature's model Id.\n * @param type The type of batch to which the feature belongs.\n * @param animationNodeId The Id of the corresponding node in the [[RenderSchedule]], or `0` if none.\n * @returns The desired appearance overrides, or `undefined` to indicate the feature should not be displayed.\n * @see [[FeatureAppearanceSource.getAppearance]] to forward the request to the source.\n * @see [Id64.isValidUint32Pair]($core-bentley) to determine if the components of an [Id64String]($core-bentley) represent a valid Id.\n */\n getFeatureAppearance(source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number): FeatureAppearance | undefined;\n}\n\n/** @public */\nexport namespace FeatureAppearanceProvider {\n /** Produce a FeatureAppearanceSource for which `getAppearance()` returns the appearance specified in `source`, potentially modified by `provider`. */\n function wrap(source: FeatureAppearanceSource, provider: FeatureAppearanceProvider): FeatureAppearanceSource {\n return {\n getAppearance: (elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return provider.getFeatureAppearance(source, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n\n /** Create a provider that obtains each feature's appearance from the source, and if the feature is visible, modifies the appearance.\n * @param supplementAppearance A function accepting the feature's base appearance and returning a supplemental appearance.\n * @public\n */\n export function supplement(supplementAppearance: (appearance: FeatureAppearance) => FeatureAppearance): FeatureAppearanceProvider {\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n const app = source.getAppearance(elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n return app ? supplementAppearance(app) : app;\n },\n };\n }\n\n /** Chain two FeatureAppearanceProviders together such that `first`'s `getFeatureAppearance` function is applied before `second`'s.\n * If `second` invokes `source.getAppearance()`, the returned appearance will include any modifications applied by `first`.\n * @public\n */\n export function chain(first: FeatureAppearanceProvider, second: FeatureAppearanceProvider): FeatureAppearanceProvider {\n if (first === second)\n return first;\n\n return {\n getFeatureAppearance: (source: FeatureAppearanceSource, elemLo: number, elemHi: number, subcatLo: number, subcatHi: number, geomClass: GeometryClass, modelLo: number, modelHi: number, type: BatchType, animationNodeId: number) => {\n return second.getFeatureAppearance(wrap(source, first), elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId);\n },\n };\n }\n}\n"]}
|
|
@@ -156,7 +156,7 @@ export declare class TextAnnotation {
|
|
|
156
156
|
/**
|
|
157
157
|
* Creates a new TextAnnotation instance from its JSON representation.
|
|
158
158
|
*/
|
|
159
|
-
static fromJSON(props
|
|
159
|
+
static fromJSON(props?: TextAnnotationProps): TextAnnotation;
|
|
160
160
|
/**
|
|
161
161
|
* Converts this annotation to its JSON representation.
|
|
162
162
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotation.d.ts","sourceRoot":"","sources":["../../../src/annotation/TextAnnotation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAEtC;;;;;OAKG;IACH,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,sBAAsB,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,CAAA;AAE1F;;;;;;;EAOE;AACF,M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S,CAAC;IAC5B,iEAAiE;IAC1D,MAAM,EAAE,oBAAoB,CAAC;IACpC,8IAA8I;IACvI,MAAM,EAAE,OAAO,CAAC;IACvB,0CAA0C;IACnC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAExC,OAAO;IAQP,oCAAoC;WACtB,MAAM,CAAC,IAAI,CAAC,EAAE,wBAAwB,GAAG,cAAc;IASrE;;OAEG;WACW,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB,GAAG,cAAc;IAenE;;OAEG;IACI,MAAM,IAAI,mBAAmB;IA6BpC;;;;;;;;;;OAUG;IACI,gBAAgB,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,GAAE,MAAU,GAAG,SAAS;IAcjF;;;OAGG;IACI,kBAAkB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAyBxD,0FAA0F;IAC1F,OAAO,CAAC,eAAe;IAsBvB,0EAA0E;IACnE,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;CAW9C"}
|
|
@@ -47,7 +47,7 @@ class TextAnnotation {
|
|
|
47
47
|
static create(args) {
|
|
48
48
|
const offset = args?.offset ?? new core_geometry_1.Point3d();
|
|
49
49
|
const angles = args?.orientation ?? new core_geometry_1.YawPitchRollAngles();
|
|
50
|
-
const textBlock = args?.textBlock ?? TextBlock_1.TextBlock.
|
|
50
|
+
const textBlock = args?.textBlock ?? TextBlock_1.TextBlock.create();
|
|
51
51
|
const anchor = args?.anchor ?? { vertical: "top", horizontal: "left" };
|
|
52
52
|
const leaders = args?.leaders ?? undefined;
|
|
53
53
|
return new TextAnnotation(offset, angles, textBlock, anchor, leaders);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotation.js","sourceRoot":"","sources":["../../../src/annotation/TextAnnotation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAoH;AACpH,2CAAwD;AA4HxD;;;;;;;;;;;;GAYG;AACH,M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;IACnE,MAAM,CAAC,KAAqB;QACjC,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU;YACpD,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ;YAC9C,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC;YAClD,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;YACxC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;YACvC,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAE3D,CAAC;CACF;AA3KD,wCA2KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\n * @beta\n */\nexport interface TextAnnotationAnchor {\n /**\n * The vertical alignment of the anchor point.\n * \"top\" aligns the anchor point with the top of the text's bounding box.\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\n */\n vertical: \"top\" | \"middle\" | \"bottom\";\n\n /**\n * The horizontal alignment of the anchor point.\n * \"left\" aligns the anchor point with left side of the text's bounding box.\n * \"center\" aligns the anchor point with center of the text with's bounding box.\n * \"right\" aligns the anchor point with right side of the text's bounding box.\n */\n horizontal: \"left\" | \"center\" | \"right\";\n}\n\n/**\n * Describes how to attach a [[TextAnnotationLeader]] to the frame around a [[TextBlock]].\n * Leader can be attached using one of the three modes:\n * - KeyPoint: attach to a point on the frame specified by the given curveIndex and fractional position.\n * - TextPoint: attach to a point that is projected on to the frame from the point on a particular line of text specified by [[LeaderTextPointOptions]].\n * - Nearest: attach to the point on frame that is nearest to [[TextAnnotationLeader.startPoint]].\n * @beta\n */\nexport type LeaderAttachment =\n | { mode: \"KeyPoint\"; curveIndex: number; fraction: number }\n | { mode: \"TextPoint\"; position: LeaderTextPointOptions }\n | { mode: \"Nearest\" };\n\n/**\n * Specifies the possible positions to attach a leader on the frame around a [[TextBlock]]\n * when [[TextAnnotationLeader.attachment.mode]] is set to TextPoint.\n * TopLeft : attach to a point projected onto the frame from the point on the left side of the first line of text.\n * TopRight : attach to a point projected onto the frame from the point on the right side of the first line of text.\n * BottomLeft : attach to a point projected onto the frame from the point on the left side of the last line of text.\n * BottomRight : attach to a point projected onto the frame from the point on the right side of the last line of text.\n * @beta\n */\nexport type LeaderTextPointOptions = \"TopLeft\" | \"TopRight\" | \"BottomLeft\" | \"BottomRight\"\n\n/**\n * A line that connects a [[TextAnnotation]] to a point in space relative to another element in the iModel.\n * A leader is always attached to the frame around the annotation's [[TextBlock]].\n * If the frame is not visible, the leader attaches to an invisible rectangular frame around the text block.\n * @see [[TextAnnotation.leaders]] for the leaders associated with an annotation.\n * @see [[TextStyleSettings.leader]] and [[styleOverrides]] to customize the appearance of leaders.\n * @beta\n*/\nexport interface TextAnnotationLeader {\n /** The point where the leader starts.\n * This is the point on another element where the leader points to */\n startPoint: Point3d;\n /** Describes how to attach the leader to the frame around [[textBlock]].*/\n attachment: LeaderAttachment;\n /** Optional intermediate points that the leader should pass through.\n * If not specified, the leader will be a straight line from startPoint to the point on the frame.\n * For now, intermediate points are a set of points which create additional LineSegments in the leader, but there could be intermediate shapes instead of straight LineSegments in future*/\n intermediatePoints?: Point3d[];\n /** Optional style overrides for the leader. If not specified, the leader will use the style defined by [[TextBlock.styleName]] as it is.\n * If specified, these overrides will be applied to the style.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n/**\n * JSON representation of a [[TextAnnotationLeader]].\n * @beta\n */\nexport interface TextAnnotationLeaderProps {\n /** See [[TextAnnotationLeader.startPoint]]. */\n startPoint: XYZProps;\n /** See [[TextAnnotationLeader.attachment]]. */\n attachment: LeaderAttachment;\n /** See [[TextAnnotationLeader.intermediatePoints]]. Default: no intermediate points. */\n intermediatePoints?: XYZProps[];\n /** See [[TextAnnotationLeader.styleOverrides]]. Default: no style overrides. */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/**\n * JSON representation of a [[TextAnnotation]].\n * @beta\n */\nexport interface TextAnnotationProps {\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\n offset?: XYZProps;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollProps;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlockProps;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.leader]]. Default: an empty leader array */\n leaders?: TextAnnotationLeaderProps[];\n}\n\n/** Arguments supplied to [[TextAnnotation.create]].\n * @beta\n */\nexport interface TextAnnotationCreateArgs {\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\n offset?: Point3d;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollAngles;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlock;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.leader]]. Default: an empty leader array */\n leaders?: TextAnnotationLeader[];\n}\n\n/**\n * Represents a formatted block of text positioned in 2d or 3d space.\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\n * edges, or in the center of the box.\n * - The [[orientation]] is applied to rotate the box around the anchor point.\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\n * @see [appendTextAnnotationGeometry]($backend) to construct the geometry and append it to an [[ElementGeometry.Builder]].\n * @beta\n */\nexport class TextAnnotation {\n /** The rotation of the annotation.\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\n */\n public orientation: YawPitchRollAngles;\n /** The formatted document. */\n public textBlock: TextBlock;\n /** Describes how to compute the [[textBlock]]'s anchor point. */\n public anchor: TextAnnotationAnchor;\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\n public offset: Point3d;\n /** The leaders of the text annotation. */\n public leaders?: TextAnnotationLeader[];\n\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor, leaders?: TextAnnotationLeader[]) {\n this.offset = offset;\n this.orientation = angles;\n this.textBlock = textBlock;\n this.anchor = anchor;\n this.leaders = leaders;\n }\n\n /** Creates a new TextAnnotation. */\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\n const offset = args?.offset ?? new Point3d();\n const angles = args?.orientation ?? new YawPitchRollAngles();\n const textBlock = args?.textBlock ?? TextBlock.createEmpty();\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\n const leaders = args?.leaders ?? undefined;\n return new TextAnnotation(offset, angles, textBlock, anchor, leaders);\n }\n\n /**\n * Creates a new TextAnnotation instance from its JSON representation.\n */\n public static fromJSON(props: TextAnnotationProps | undefined): TextAnnotation {\n return TextAnnotation.create({\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\n anchor: props?.anchor ? { ...props.anchor } : undefined,\n leaders: props?.leaders ? props.leaders.map((leader) => ({\n startPoint: Point3d.fromJSON(leader.startPoint),\n attachment: leader.attachment,\n styleOverrides: leader.styleOverrides ?? undefined,\n intermediatePoints: leader.intermediatePoints ? leader.intermediatePoints.map((point) => Point3d.fromJSON(point)) : undefined,\n })) : undefined,\n });\n }\n\n /**\n * Converts this annotation to its JSON representation.\n */\n public toJSON(): TextAnnotationProps {\n const props: TextAnnotationProps = {};\n\n // Even if the text block is empty, we want to record its style ID and overrides, e.g.,\n // so the user can pick up where they left off editing it next time.\n props.textBlock = this.textBlock.toJSON();\n\n if (!this.offset.isZero) {\n props.offset = this.offset.toJSON();\n }\n\n if (!this.orientation.isIdentity()) {\n props.orientation = this.orientation.toJSON();\n }\n\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\n props.anchor = { ...this.anchor };\n }\n\n props.leaders = this.leaders?.map((leader) => ({\n startPoint: leader.startPoint.toJSON(),\n attachment: leader.attachment,\n styleOverrides: leader.styleOverrides ?? undefined,\n intermediatePoints: leader.intermediatePoints ? leader.intermediatePoints.map((point) => point.toJSON()) : undefined,\n })) ?? undefined;\n\n return props;\n }\n\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\n * If a scale factor is specified, the transform will also scale the annotation by that factor. Usually, this should come from the [[Drawing]] containing the annotation.\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\n * @param scaleFactor A factor by which to scale the annotation. Default: 1 (no scaling).\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n */\n public computeTransform(boundingBox: Range2d, scaleFactor: number = 1): Transform {\n const anchorPt = this.computeAnchorPoint(boundingBox);\n const matrix = this.orientation.toMatrix3d();\n\n const transform = Transform.createIdentity();\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\n const scaleTransform = Transform.createScaleAboutPoint(anchorPt, scaleFactor);\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\n transform.multiplyTransformTransform(translation, transform);\n transform.multiplyTransformTransform(scaleTransform, transform);\n transform.multiplyTransformTransform(rotation, transform);\n return transform;\n }\n\n /** Compute the anchor point of this annotation as specified by [[anchor]].\n * @param boundingBox A box fully containing the [[textBlock]].\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\n */\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\n let x = boundingBox.low.x;\n let y = boundingBox.high.y;\n\n switch (this.anchor.horizontal) {\n case \"center\":\n x += boundingBox.xLength() / 2;\n break;\n case \"right\":\n x += boundingBox.xLength();\n break;\n }\n\n switch (this.anchor.vertical) {\n case \"middle\":\n y -= boundingBox.yLength() / 2;\n break;\n case \"bottom\":\n y -= boundingBox.yLength();\n break;\n }\n\n return new Point3d(x, y, 0);\n }\n\n /** Returns true if the leaders of this annotation are equal to the leaders of `other`. */\n private areLeadersEqual(leadersA?: TextAnnotationLeader[], leadersB?: TextAnnotationLeader[]): boolean {\n if (leadersA === leadersB) return true;\n if (!leadersA || !leadersB || leadersA.length !== leadersB.length) return false;\n\n for (let i = 0; i < leadersA.length; ++i) {\n const a = leadersA[i];\n const b = leadersB[i];\n\n if (!a.startPoint.isAlmostEqual(b.startPoint)) return false;\n if (JSON.stringify(a.attachment) !== JSON.stringify(b.attachment)) return false;\n if (JSON.stringify(a.styleOverrides) !== JSON.stringify(b.styleOverrides)) return false;\n\n const pointsA = a.intermediatePoints ?? [];\n const pointsB = b.intermediatePoints ?? [];\n if (pointsA.length !== pointsB.length) return false;\n for (let j = 0; j < pointsA.length; ++j) {\n if (!pointsA[j].isAlmostEqual(pointsB[j])) return false;\n }\n }\n return true;\n }\n\n /** Returns true if this annotation is logically equivalent to `other`. */\n public equals(other: TextAnnotation): boolean {\n if (this.anchor.horizontal !== other.anchor.horizontal ||\n this.anchor.vertical !== other.anchor.vertical ||\n !this.orientation.isAlmostEqual(other.orientation) ||\n !this.offset.isAlmostEqual(other.offset) ||\n !this.textBlock.equals(other.textBlock))\n return false;\n\n return this.areLeadersEqual(this.leaders, other.leaders);\n\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"TextAnnotation.js","sourceRoot":"","sources":["../../../src/annotation/TextAnnotation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAoH;AACpH,2CAAwD;AA4HxD;;;;;;;;;;;;GAYG;AACH,MAAa,cAAc;IACzB;;OAEG;IACI,WAAW,CAAqB;IACvC,8BAA8B;IACvB,SAAS,CAAY;IAC5B,iEAAiE;IAC1D,MAAM,CAAuB;IACpC,8IAA8I;IACvI,MAAM,CAAU;IACvB,0CAA0C;IACnC,OAAO,CAA0B;IAExC,YAAoB,MAAe,EAAE,MAA0B,EAAE,SAAoB,EAAE,MAA4B,EAAE,OAAgC;QACnJ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAA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IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAE3D,CAAC;CACF;AA3KD,wCA2KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\nimport { TextStyleSettingsProps } from \"./TextStyle\";\n\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\n * @beta\n */\nexport interface TextAnnotationAnchor {\n /**\n * The vertical alignment of the anchor point.\n * \"top\" aligns the anchor point with the top of the text's bounding box.\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\n */\n vertical: \"top\" | \"middle\" | \"bottom\";\n\n /**\n * The horizontal alignment of the anchor point.\n * \"left\" aligns the anchor point with left side of the text's bounding box.\n * \"center\" aligns the anchor point with center of the text with's bounding box.\n * \"right\" aligns the anchor point with right side of the text's bounding box.\n */\n horizontal: \"left\" | \"center\" | \"right\";\n}\n\n/**\n * Describes how to attach a [[TextAnnotationLeader]] to the frame around a [[TextBlock]].\n * Leader can be attached using one of the three modes:\n * - KeyPoint: attach to a point on the frame specified by the given curveIndex and fractional position.\n * - TextPoint: attach to a point that is projected on to the frame from the point on a particular line of text specified by [[LeaderTextPointOptions]].\n * - Nearest: attach to the point on frame that is nearest to [[TextAnnotationLeader.startPoint]].\n * @beta\n */\nexport type LeaderAttachment =\n | { mode: \"KeyPoint\"; curveIndex: number; fraction: number }\n | { mode: \"TextPoint\"; position: LeaderTextPointOptions }\n | { mode: \"Nearest\" };\n\n/**\n * Specifies the possible positions to attach a leader on the frame around a [[TextBlock]]\n * when [[TextAnnotationLeader.attachment.mode]] is set to TextPoint.\n * TopLeft : attach to a point projected onto the frame from the point on the left side of the first line of text.\n * TopRight : attach to a point projected onto the frame from the point on the right side of the first line of text.\n * BottomLeft : attach to a point projected onto the frame from the point on the left side of the last line of text.\n * BottomRight : attach to a point projected onto the frame from the point on the right side of the last line of text.\n * @beta\n */\nexport type LeaderTextPointOptions = \"TopLeft\" | \"TopRight\" | \"BottomLeft\" | \"BottomRight\"\n\n/**\n * A line that connects a [[TextAnnotation]] to a point in space relative to another element in the iModel.\n * A leader is always attached to the frame around the annotation's [[TextBlock]].\n * If the frame is not visible, the leader attaches to an invisible rectangular frame around the text block.\n * @see [[TextAnnotation.leaders]] for the leaders associated with an annotation.\n * @see [[TextStyleSettings.leader]] and [[styleOverrides]] to customize the appearance of leaders.\n * @beta\n*/\nexport interface TextAnnotationLeader {\n /** The point where the leader starts.\n * This is the point on another element where the leader points to */\n startPoint: Point3d;\n /** Describes how to attach the leader to the frame around [[textBlock]].*/\n attachment: LeaderAttachment;\n /** Optional intermediate points that the leader should pass through.\n * If not specified, the leader will be a straight line from startPoint to the point on the frame.\n * For now, intermediate points are a set of points which create additional LineSegments in the leader, but there could be intermediate shapes instead of straight LineSegments in future*/\n intermediatePoints?: Point3d[];\n /** Optional style overrides for the leader. If not specified, the leader will use the style defined by [[TextBlock.styleName]] as it is.\n * If specified, these overrides will be applied to the style.\n */\n styleOverrides?: TextStyleSettingsProps;\n}\n/**\n * JSON representation of a [[TextAnnotationLeader]].\n * @beta\n */\nexport interface TextAnnotationLeaderProps {\n /** See [[TextAnnotationLeader.startPoint]]. */\n startPoint: XYZProps;\n /** See [[TextAnnotationLeader.attachment]]. */\n attachment: LeaderAttachment;\n /** See [[TextAnnotationLeader.intermediatePoints]]. Default: no intermediate points. */\n intermediatePoints?: XYZProps[];\n /** See [[TextAnnotationLeader.styleOverrides]]. Default: no style overrides. */\n styleOverrides?: TextStyleSettingsProps;\n}\n\n/**\n * JSON representation of a [[TextAnnotation]].\n * @beta\n */\nexport interface TextAnnotationProps {\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\n offset?: XYZProps;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollProps;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlockProps;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.leader]]. Default: an empty leader array */\n leaders?: TextAnnotationLeaderProps[];\n}\n\n/** Arguments supplied to [[TextAnnotation.create]].\n * @beta\n */\nexport interface TextAnnotationCreateArgs {\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\n offset?: Point3d;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollAngles;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlock;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.leader]]. Default: an empty leader array */\n leaders?: TextAnnotationLeader[];\n}\n\n/**\n * Represents a formatted block of text positioned in 2d or 3d space.\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\n * edges, or in the center of the box.\n * - The [[orientation]] is applied to rotate the box around the anchor point.\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\n * @see [appendTextAnnotationGeometry]($backend) to construct the geometry and append it to an [[ElementGeometry.Builder]].\n * @beta\n */\nexport class TextAnnotation {\n /** The rotation of the annotation.\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\n */\n public orientation: YawPitchRollAngles;\n /** The formatted document. */\n public textBlock: TextBlock;\n /** Describes how to compute the [[textBlock]]'s anchor point. */\n public anchor: TextAnnotationAnchor;\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\n public offset: Point3d;\n /** The leaders of the text annotation. */\n public leaders?: TextAnnotationLeader[];\n\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor, leaders?: TextAnnotationLeader[]) {\n this.offset = offset;\n this.orientation = angles;\n this.textBlock = textBlock;\n this.anchor = anchor;\n this.leaders = leaders;\n }\n\n /** Creates a new TextAnnotation. */\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\n const offset = args?.offset ?? new Point3d();\n const angles = args?.orientation ?? new YawPitchRollAngles();\n const textBlock = args?.textBlock ?? TextBlock.create();\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\n const leaders = args?.leaders ?? undefined;\n return new TextAnnotation(offset, angles, textBlock, anchor, leaders);\n }\n\n /**\n * Creates a new TextAnnotation instance from its JSON representation.\n */\n public static fromJSON(props?: TextAnnotationProps): TextAnnotation {\n return TextAnnotation.create({\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\n anchor: props?.anchor ? { ...props.anchor } : undefined,\n leaders: props?.leaders ? props.leaders.map((leader) => ({\n startPoint: Point3d.fromJSON(leader.startPoint),\n attachment: leader.attachment,\n styleOverrides: leader.styleOverrides ?? undefined,\n intermediatePoints: leader.intermediatePoints ? leader.intermediatePoints.map((point) => Point3d.fromJSON(point)) : undefined,\n })) : undefined,\n });\n }\n\n /**\n * Converts this annotation to its JSON representation.\n */\n public toJSON(): TextAnnotationProps {\n const props: TextAnnotationProps = {};\n\n // Even if the text block is empty, we want to record its style ID and overrides, e.g.,\n // so the user can pick up where they left off editing it next time.\n props.textBlock = this.textBlock.toJSON();\n\n if (!this.offset.isZero) {\n props.offset = this.offset.toJSON();\n }\n\n if (!this.orientation.isIdentity()) {\n props.orientation = this.orientation.toJSON();\n }\n\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\n props.anchor = { ...this.anchor };\n }\n\n props.leaders = this.leaders?.map((leader) => ({\n startPoint: leader.startPoint.toJSON(),\n attachment: leader.attachment,\n styleOverrides: leader.styleOverrides ?? undefined,\n intermediatePoints: leader.intermediatePoints ? leader.intermediatePoints.map((point) => point.toJSON()) : undefined,\n })) ?? undefined;\n\n return props;\n }\n\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\n * If a scale factor is specified, the transform will also scale the annotation by that factor. Usually, this should come from the [[Drawing]] containing the annotation.\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\n * @param scaleFactor A factor by which to scale the annotation. Default: 1 (no scaling).\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n */\n public computeTransform(boundingBox: Range2d, scaleFactor: number = 1): Transform {\n const anchorPt = this.computeAnchorPoint(boundingBox);\n const matrix = this.orientation.toMatrix3d();\n\n const transform = Transform.createIdentity();\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\n const scaleTransform = Transform.createScaleAboutPoint(anchorPt, scaleFactor);\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\n transform.multiplyTransformTransform(translation, transform);\n transform.multiplyTransformTransform(scaleTransform, transform);\n transform.multiplyTransformTransform(rotation, transform);\n return transform;\n }\n\n /** Compute the anchor point of this annotation as specified by [[anchor]].\n * @param boundingBox A box fully containing the [[textBlock]].\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\n */\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\n let x = boundingBox.low.x;\n let y = boundingBox.high.y;\n\n switch (this.anchor.horizontal) {\n case \"center\":\n x += boundingBox.xLength() / 2;\n break;\n case \"right\":\n x += boundingBox.xLength();\n break;\n }\n\n switch (this.anchor.vertical) {\n case \"middle\":\n y -= boundingBox.yLength() / 2;\n break;\n case \"bottom\":\n y -= boundingBox.yLength();\n break;\n }\n\n return new Point3d(x, y, 0);\n }\n\n /** Returns true if the leaders of this annotation are equal to the leaders of `other`. */\n private areLeadersEqual(leadersA?: TextAnnotationLeader[], leadersB?: TextAnnotationLeader[]): boolean {\n if (leadersA === leadersB) return true;\n if (!leadersA || !leadersB || leadersA.length !== leadersB.length) return false;\n\n for (let i = 0; i < leadersA.length; ++i) {\n const a = leadersA[i];\n const b = leadersB[i];\n\n if (!a.startPoint.isAlmostEqual(b.startPoint)) return false;\n if (JSON.stringify(a.attachment) !== JSON.stringify(b.attachment)) return false;\n if (JSON.stringify(a.styleOverrides) !== JSON.stringify(b.styleOverrides)) return false;\n\n const pointsA = a.intermediatePoints ?? [];\n const pointsB = b.intermediatePoints ?? [];\n if (pointsA.length !== pointsB.length) return false;\n for (let j = 0; j < pointsA.length; ++j) {\n if (!pointsA[j].isAlmostEqual(pointsB[j])) return false;\n }\n }\n return true;\n }\n\n /** Returns true if this annotation is logically equivalent to `other`. */\n public equals(other: TextAnnotation): boolean {\n if (this.anchor.horizontal !== other.anchor.horizontal ||\n this.anchor.vertical !== other.anchor.vertical ||\n !this.orientation.isAlmostEqual(other.orientation) ||\n !this.offset.isAlmostEqual(other.offset) ||\n !this.textBlock.equals(other.textBlock))\n return false;\n\n return this.areLeadersEqual(this.leaders, other.leaders);\n\n }\n}"]}
|