EmphasizeElements Class
An implementation of FeatureOverrideProvider for emphasizing selected elements through simple color/transparency appearance overrides.
Implements
Methods
Name | Description | |
---|---|---|
constructor(): EmphasizeElements | ||
addFeatureOverrides(overrides: FeatureSymbology.Overrides, vp: Viewport): void | Establish active feature overrides to emphasize elements and apply color/transparency overrides. | |
clearAlwaysDrawnElements(vp: Viewport): boolean | Clear always drawn elements. | |
clearEmphasizedElements(vp: Viewport): boolean | Clear emphasized elements. | |
clearEmphasizedIsolatedElements(vp: Viewport, setToAlwaysDrawn: boolean): boolean | Clear emphasized isolated elements. | |
clearHiddenElements(vp: Viewport): boolean | Clear hidden elements. | |
clearIsolatedElements(vp: Viewport): boolean | Clear isolated elements. | |
clearNeverDrawnElements(vp: Viewport): boolean | Clear never drawn elements. | |
clearOverriddenElements(vp: Viewport, keyOrIds?: number | Id64Arg): boolean | Clear color/transparency overrides from elements. | |
createDefaultAppearance(): FeatureAppearance | Create default appearance to use for emphasizeElements when not supplied by caller. | |
createOverrideKey(color: ColorDef, override: FeatureOverrideType): undefined | number | Get override key from color and override type | |
emphasizeElements(ids: Id64Arg, vp: Viewport, defaultAppearance?: FeatureAppearance, replace: booleantrue): boolean | Set the element IDs to be always drawn normally with all other elements in the view overridden to draw using a default appearance. | |
emphasizeSelectedElements(vp: Viewport, defaultAppearance?: FeatureAppearance, replace: booleantrue, clearSelection: booleantrue): boolean | Set the currently selected elements to be always drawn normally with all other elements in the view overridden to draw using a default appearance. | |
fromJSON(props: EmphasizeElementsProps, vp: Viewport): boolean | Initialize from JSON representation. | |
getAlwaysDrawnElements(vp: Viewport): undefined | Id64Set | Get the IDs of the currently always drawn elements. | |
getEmphasizedElements(vp: Viewport): undefined | Id64Set | Get the IDs of the currently emphasized elements. | |
getEmphasizedIsolatedElements(): undefined | Id64Set | Get the IDs of the currently emphasized isolated elements. | |
getHiddenElements(vp: Viewport): undefined | Id64Set | Get the IDs of the currently hidden elements. | |
getIsolatedElements(vp: Viewport): undefined | Id64Set | Get the IDs of the currently isolated elements. | |
getNeverDrawnElements(vp: Viewport): undefined | Id64Set | Get the IDs of the currently never drawn elements. | |
getOverriddenElements(): undefined | Map<number, Id64Set> | Get the map of current elements with color/transparency overrides. | |
getOverriddenElementsByKey(key: number): undefined | Id64Set | Get the IDs of current elements with the specified color/transparency override. | |
getOverrideFromKey(key: number): { color: ColorDef, overrideType: FeatureOverrideType } | Get color and override type for the given key. | |
hideElements(ids: Id64Arg, vp: Viewport, replace: booleanfalse): boolean | Set the element IDs to be never drawn. | |
hideSelectedElements(vp: Viewport, replace: booleanfalse, clearSelection: booleantrue): boolean | Set the currently selected elements to be never drawn. | |
isActive(vp: Viewport): boolean | ||
isolateElements(ids: Id64Arg, vp: Viewport, replace: booleantrue): boolean | Set the element IDs to be always drawn exclusively. | |
isolateSelectedElements(vp: Viewport, replace: booleantrue, clearSelection: booleantrue): boolean | Set the currently selected elements to be always drawn exclusively. | |
overrideElements(ids: Id64Arg, vp: Viewport, color: ColorDef, override: FeatureOverrideTypeFeatureOverrideType.ColorOnly, replace: booleanfalse): boolean | Set the element IDs to display with a color/transparency override. | |
overrideSelectedElements(vp: Viewport, color: ColorDef, override: FeatureOverrideTypeFeatureOverrideType.ColorOnly, replace: booleanfalse, clearSelection: booleantrue): boolean | Set the currently selected elements to display with a color/transparency override. | |
toJSON(vp: Viewport): EmphasizeElementsProps | Serialize to JSON representation. | |
clear(vp: Viewport, inactiveOnly: booleanfalse): void Static | Drop the EmphasizeElements provider currently registered with the specified Viewport, if any is registered. | |
get(vp: Viewport): undefined | EmphasizeElements Static | Return the EmphasizeElements provider currently registered with the specified Viewport, if one is already registered. | |
getOrCreate(vp: Viewport): EmphasizeElements Static | Return the EmphasizeElements provider currently registered with the specified Viewport, or register a new one and return it. |
Properties
Name | Type | Description | |
---|---|---|---|
defaultAppearance Accessor | undefined | FeatureAppearance | Establish a default appearance to apply to elements without overrides. | |
unanimatedAppearance Accessor | undefined | FeatureAppearance | Establish a default appearance to apply to elements that are not animated by the view's RenderSchedule.Script. | |
wantEmphasis | boolean | If true, all overridden and emphasized elements will also have the "emphasis" effect applied to them. |
Defined in
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.