Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API drawing globalCompositeOperation


May 19, 2021 WeChat Mini Program Development Document


Table of contents


canvasContext.globalCompositeOperation


Base library 1.9.90 starts to support, and low versions need to be compatible

Defined

This property is the type of composition operation that is set to be applied when a new shape is drawn.

Grammar

canvasContext.globalCompositeOperation = type

Parameters

The property value Type Description
type String Identify which composition or blend mode operation to use

The actions supported by type are:

Platform Operation
Android xor, source-over, source-atop, destination-out, lighter, overlay, darken, lighten, hard-light
Ios xor, source-over, source-atop, destination-over, destination-out, lighter, multiply, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion , saturation, luminosity