博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
html5 canvas 渲染像素混合模式
阅读量:4315 次
发布时间:2019-06-06

本文共 1219 字,大约阅读时间需要 4 分钟。

Canvas API 的 globalCompositeOperation 属性的取值:

source-over:

This is the default setting and draws new shapes on top of the existing canvas content.
source-in:
The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.
source-out:
The new shape is drawn where it doesn't overlap the existing canvas content.
source-atop:
The new shape is only drawn where it overlaps the existing canvas content.
lighter:
Where both shapes overlap the color is determined by adding color values.
xor:
Shapes are made transparent where both overlap and drawn normal everywhere else.
destination-over:
New shapes are drawn behind the existing canvas content.
destination-in:
The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.
destination-out:
The existing content is kept where it doesn't overlap the new shape.
destination-atop:
The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.
darker:
Where both shapes overlap the color is determined by subtracting color values.

转载于:https://www.cnblogs.com/vilyLei/articles/2200148.html

你可能感兴趣的文章
Angular2 - 概述
查看>>
正则表达式tab表示\t
查看>>
NodeJS+Express+MongoDB 简单实现数据录入及回显展示【Study笔记】
查看>>
Highcharts使用指南
查看>>
网络基础(子网划分)
查看>>
Google C++ Style
查看>>
MyBatis总结八:缓存介绍(一级缓存,二级缓存)
查看>>
div+css教程网站建设门户网站和电子商务网站CSS样式表
查看>>
[LeetCode][JavaScript]Candy
查看>>
Mybatis分页插件
查看>>
sk_buff Structure
查看>>
oracle的级联更新、删除
查看>>
多浏览器开发需要注意的问题之一
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>
springMVC中一个class中的多个方法
查看>>