Draw-time context used to resolve semantic entity colors into pixel RGB values.

ACI 7 (foreground / contrast color) depends on the current background, so RGB resolution must happen in the renderer with this context rather than on traits.

Constructors

Properties

backgroundIsDark: boolean

Whether the current draw background is dark.

database: unknown

Database being drawn. Runtime type is AcDbDatabase (data-model); typed as unknown here so graphic-interface does not depend on data-model.

fallbackRgb?: number

Fallback RGB when the resolved color has no concrete RGB value.

foregroundOnDark: number

RGB used when the resolved color is foreground (ACI 7) on a dark background.

foregroundOnLight: number

RGB used when the resolved color is foreground (ACI 7) on a light background.

Methods

  • Creates a draw-time context from the current canvas background colour.

    Parameters

    • backgroundColor: number = ACGI_MODEL_SPACE_BACKGROUND
    • Optionaldatabase: unknown

    Returns AcGiContext