Skip to content

Type Alias: GlobalCompositeOperation ​

ts
type GlobalCompositeOperation = 
  | "source-over"
  | "lighter"
  | "lighten"
  | "darker"
  | "darken"
  | "destination-out"
  | "destination-over"
  | "source-atop"
  | "xor"
  | "copy"
  | "source-in"
  | "destination-in"
  | "source-out"
  | "destination-atop"
  | "multiply"
  | "screen"
  | "overlay"
  | "color-dodge"
  | "color-burn"
  | "hard-light"
  | "soft-light"
  | "difference"
  | "exclusion"
  | "hue"
  | "saturation"
  | "color"
  | "luminosity";

Defined in: types/desktop-engine.d.ts:1542

Compositing mode, as on the web; darker is another name for darken. The blend modes from multiply on came with API 5. lighten, darken, the blend modes and the ones that clear the canvas outside what's drawn (copy, source-in, source-out, destination-in, destination-atop) draw through a layer the size of the canvas: about 0.25 ms of CPU each draw, so batch drawing in them into few calls

The SDK is released under the Apache License 2.0