UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

47 lines 2.52 kB
/** @packageDocumentation * @module DisplayStyles */ import { Id64String } from "@itwin/core-bentley"; import { ColorDef } from "./ColorDef"; import { SubCategoryAppearance } from "./SubCategoryAppearance"; /** Overrides selected aspects of a [[SubCategoryAppearance]] in the context of a [[DisplayStyleState]]. * When determining how geometry belonging to a [[SubCategory]] will appear when drawn within a view: * 1. The base [[SubCategoryAppearance]] associated with that subcategory is obtained. * 2. The [[SubCategoryOverride]] associated with that subcategory in the [[DisplayStyleState]] is obtained. * 3. Any aspects of the appearance overridden by the SubCategoryOverride are replaced with the values from the SubCategoryOverride. * An aspect is overridden by virtue of not being set to "undefined" in the SubCategoryOverride. * @see [[DisplayStyleState.overrideSubCategory]] * @public */ export declare class SubCategoryOverride { /** See [[SubCategoryAppearance.color]] */ readonly color?: ColorDef; /** See [[SubCategoryAppearance.invisible]] */ readonly invisible?: boolean; /** See [[SubCategoryAppearance.weight]] */ readonly weight?: number; /** @internal Overriding with arbitrary custom line style is not supported - overriding with LinePixels enum could be. */ readonly style?: Id64String; /** See [[SubCategoryAppearance.priority]] */ readonly priority?: number; /** See [[SubCategoryAppearance.materialId]] */ readonly material?: Id64String; /** See [[SubCategoryAppearance.transparency]] */ readonly transparency?: number; /** Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined). */ get anyOverridden(): boolean; /** Returns a SubCategoryAppearance overridden to match the properties defined by this SubCategoryOverride. */ override(appearance: SubCategoryAppearance): SubCategoryAppearance; /** Convert this SubCategoryOverride to a JSON object * @internal */ toJSON(): SubCategoryAppearance.Props; /** Perform equality comparison against another SubCategoryOverride. */ equals(other: SubCategoryOverride): boolean; /** Create a new SubCategoryOverride from a JSON object */ static fromJSON(json?: SubCategoryAppearance.Props): SubCategoryOverride; private constructor(); /** A default SubCategoryOverride which overrides nothing. */ static defaults: SubCategoryOverride; } //# sourceMappingURL=SubCategoryOverride.d.ts.map