Linearly blends a new pixel with an existing color value in a canvas. Compared to putPixel32, this function supports sub-pixel placement, but is dramatically slower.

  • Parameters

    • canvas: Canvas2D | Canvas2DHeadless

      The canvas to interact with.

    • x: number

      The X coordinate at which to place the pixel.

    • y: number

      The Y coordinate at which to place the pixel.

    • color: number

      The color of the pixel.

    • alpha: number

      The alpha value to use to blend the pixel with existing color at the location.

    Returns void