pixi.js
    Preparing search index...

    Class CanvasContextSystemAdvanced

    Canvas 2D context system for the CanvasRenderer.

    Implements

    Index

    Constructors

    Properties

    _activeBlendMode: BLEND_MODES = 'normal'

    Current canvas blend mode.

    _outerBlend: boolean = false

    True when external blend mode control is in use.

    _projTransform: Matrix = null

    Optional projection transform for render targets.

    activeContext: CrossPlatformCanvasRenderingContext2D

    Active 2D context for rendering (root or render target).

    activeResolution: number = 1

    Resolution of the active context.

    blendModes: Record<BLEND_MODES, GlobalCompositeOperation> = ...

    Map of Pixi blend modes to canvas composite operations.

    rootContext: CrossPlatformCanvasRenderingContext2D

    Root 2D context tied to the renderer's canvas.

    smoothProperty: SmoothingEnabledProperties = 'imageSmoothingEnabled'

    The image smoothing property to toggle for this browser.

    Methods

    • Clears the current render target, optionally filling with a color.

      Parameters

      • OptionalclearColor: string | number | number[]

        Color to fill after clearing.

      • Optionalalpha: number

        Alpha override for the clear color.

      Returns void

    • Releases context references.

      Returns void

    • Initializes the root context and smoothing flag selection.

      Returns void

    • Sets the active blend mode.

      Parameters

      Returns void

    • Sets the current transform on the active context.

      Parameters

      • transform: Matrix

        Transform to apply.

      • OptionalroundPixels: boolean

        Whether to round translation to integers.

      • OptionallocalResolution: number

        Optional local resolution multiplier.

      • OptionalskipGlobalTransform: boolean

        If true, skip applying the global world transform matrix.

      Returns void