@itwin/core-common
Version:
iTwin.js components common to frontend and backend
92 lines • 4.48 kB
TypeScript
/** @packageDocumentation
* @module Symbology
*/
import { Id64String } from "@itwin/core-bentley";
import { ColorDef, ColorDefProps } from "./ColorDef";
/** Parameters that define the way geometry on a [[SubCategory]] appears.
* SubCategoryAppearance describes the intrinsic appearance of geometry belonging to that SubCategory, independent of a particular [[ViewState]].
* Aspects of a SubCategory's appearance can be overridden in the context of a particular [[ViewState]] through the use of [[SubCategoryOverride]]s.
* @public
*/
export declare class SubCategoryAppearance {
/** The color of the geometry.
* @note The transparency component of the color is ignored.
* @see [[SubCategoryAppearance.transparency]].
*/
readonly color: ColorDef;
/** The line width, in pixels.
* @note The renderer will clamp values to the integer range [1, 32].
*/
readonly weight: number;
/** The display priority used to control which geometry draws in front of other geometry within a 2D view.
* The priority is a number in the range [-8388576,8388576].
* Where two pieces of geometry overlap, the one with the larger priority value draws on top of the one with the smaller priority.
* If they have equal priorities, the order in which they draw is undefined, and z-fighting may result.
* @note This property has no effect in 3D views unless [[PlanProjectionSettings]] are in effect.
*/
readonly priority: number;
/** A value in the range [0, 1] indicating the transparency of the geometry where 0.0 means "fully opaque" and 1.0 means "fully transparent". */
readonly transparency: number;
/** If true, geometry belonging to this SubCategory is not drawn. */
readonly invisible: boolean;
/** @internal */
readonly dontPlot: boolean;
/** @internal */
readonly dontSnap: boolean;
/** @internal */
readonly dontLocate: boolean;
/** The element ID of the line style used to draw curves, or an invalid ID if no line style is specified. */
readonly styleId: Id64String;
/** The element ID of the material applied to surfaces, or an invalid ID if no material is specified. */
readonly materialId: Id64String;
/** @internal */
protected readonly _fillColor?: ColorDef;
/** @internal */
protected readonly _fillTransparency?: number;
/** The fill color of geometry marked as being filled.
* @note The transparency component of the fill color is ignored.
* @see [[SubCategoryAppearance.fillTransparency]].
*/
get fillColor(): ColorDef;
/** A value in the range [0, 1] indicating the fill transparency of the geometry where 0.0 means "fully opaque" and 1.0 means "fully transparent". */
get fillTransparency(): number;
constructor(props?: SubCategoryAppearance.Props);
equals(other: SubCategoryAppearance): boolean;
/** @internal */
toJSON(): SubCategoryAppearance.Props;
clone(): SubCategoryAppearance;
static defaults: SubCategoryAppearance;
}
/** @public */
export declare namespace SubCategoryAppearance {
/** Properties used to create a SubCategoryAppearance
* See [[SubCategoryAppearance]]
*/
interface Props {
/** See [[SubCategoryAppearance.color]]. Defaults to black. */
color?: ColorDefProps;
/** See [[SubCategoryAppearance.fillColor]]. Defaults to [[SubCategoryAppearance.color]]. */
fill?: ColorDefProps;
/** See [[SubCategoryAppearance.invisible]]. Defaults to false. */
invisible?: boolean;
/** @internal */
dontPlot?: boolean;
/** @internal */
dontSnap?: boolean;
/** @internal */
dontLocate?: boolean;
/** See [[SubCategoryAppearance.weight]]. Defaults to 0. */
weight?: number;
/** See [[SubCategoryAppearance.styleId]]. Defaults to an invalid ID indicating "no line style". */
style?: Id64String;
/** See [[SubCategoryAppearance.priority]]. Defaults to 0. */
priority?: number;
/** See [[SubCategoryAppearance.materialId]]. Defaults to an invalid ID indicating "no material". */
material?: Id64String;
/** See [[SubCategoryAppearance.transparency]]. Defaults to 0. */
transp?: number;
/** See [[SubCategoryAppearance.fillTransparency]]. Defaults to [[SubCategoryAppearance.transparency]]. */
transpFill?: number;
}
}
//# sourceMappingURL=SubCategoryAppearance.d.ts.map