当前位置: 首页 > news >正文

用jsp做的网站源代码关联词有哪些 全部

用jsp做的网站源代码,关联词有哪些 全部,怎么在网站上做下载,高端网站建设公司哪家服务态度好查看专栏目录 canvas实例应用100专栏,提供canvas的基础知识,高级动画,相关应用扩展等信息。canvas作为html的一部分,是图像图标地图可视化的一个重要的基础,学好了canvas,在其他的一些应用上将会起到非常重…

在这里插入图片描述

查看专栏目录

canvas实例应用100+专栏,提供canvas的基础知识,高级动画,相关应用扩展等信息。canvas作为html的一部分,是图像图标地图可视化的一个重要的基础,学好了canvas,在其他的一些应用上将会起到非常重要的帮助。

文章目录

    • 示例效果图
    • type列表
    • 示例源代码(共115行)
    • canvas基本属性
    • canvas基础方法

canvas如何设置图形各种混合模式呢?通过context.globalCompositeOperation = type的方法来实现。这里面的type有很多种。请参考列表。

示例效果图

在这里插入图片描述

type列表

type说明
source-over绘制图形的默认混合方式,直接在现有图形的上方绘制,纯视觉覆盖
source-in仅在和原Canvas图形重叠的位置绘制新图形,否则处理为透明。如果重叠位置是半透明颜色,则也处理为半透明。此效果类似遮罩,新内容为显示层,原内容是遮罩层,遮罩层无论张什么样子,都不显示。
source-out和source-in相反,重叠的位置是透明的,不重叠的或者半透明的重叠区域反而显示新图形。同样,原内容无论性质如何,最终效果都不会出现。
source-atop仅在新内容与原内容重叠的位置进行类似遮罩的绘制,如果是没有重叠的位置,则原封不动显示。这个和 source-in 区别在于source-in 就算与原内容不重叠,原内容也永远不会显示,但 source-atop 会保留。
destination-overdestination-*系列和source-*系列的区别就是动作的主体是新内容还是原内容。source-*系列是新内容,而destination-*系列动作主体是元内容。例如这里的destination-over表示原内容在上方,也就是新内容在原内容的下方绘制。
destination-in显示原内容和新内容重叠的部分。
destination-out隐藏原内容和新内容重叠的部分。
destination-atop原内容只显示和新内容重叠的部分,同时新内容在下方显示。
lighter无论是哪种语言,哪种工具的混合模式,其实概念都类似的。如果这里的lighter等同于Adobe Photoshop中lighter color的话,则这个属性值可以理解为自然光混合效果。红绿蓝混合会成为白色。
copy只显示新内容。
xor互相重叠的区域是透明的。
multiply正片叠底。顶层的像素与底层的对应像素相乘。结果是一幅更黑暗的图画。
screen滤色。像素反转,相乘,然后再反转。最终得到更淡的图形(和multiply相反)。
overlay叠加。multiply和screen组合效果。基础图层上暗的部分更暗,亮的部分更亮。
darken变暗。保留原内容和新内容中最暗的像素。
lighten变亮。保留原内容和新内容中最亮的像素。
color-dodge颜色减淡。底部图层色值除以顶部图层的反相色值。
color-burn颜色加深。底部图层的色值除以顶部图层色值,得到的结果再反相。
hard-light强光。类似overlay,是multiply和screen组合效果。只不过底层和顶层位置交换下。
soft-light柔光。hard-light的柔和版本。纯黑色或白色不会生成为纯黑色或白色。
difference差异。顶层色值减去底层色值的绝对值。如果都是白色,则最后是黑色,因为值为0;什么时候是白色呢,例如RGB(255,0,0)和RGB(0,255,255),色值相减后绝对值是RGB(255,255,255)。
exclusion排除。类似difference,不过对比度较低。
hue色调。最终的颜色保留底层的亮度和色度,同时采用顶层的色调。
saturation饱和度。最终的颜色保留底层的亮度和色调,同时采用顶层的色度。
color色值。最终的颜色保留底层的亮度,同时采用顶层的色调和色度。
luminosity亮度。最终的颜色保留底层的色调和色度,同时采用顶层的亮度。

示例源代码(共115行)

/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: 2909222303@qq.com
* @weixin: gis-dajianshi
* @First published in CSDN
* @First published time: 2024-02-04
*/
<template><div class="djs_container"><div class="top"><h3>canvas设置图形各种混合模式</h3><div>大剑师兰特, 还是大剑师兰特,gis-dajianshi</div><h4><el-button type="primary" size="mini" @click="draw('source-over')">source-over</el-button><el-button type="primary" size="mini" @click="draw('source-in')">source-in</el-button><el-button type="primary" size="mini" @click="draw('source-out')">source-out</el-button><el-button type="primary" size="mini" @click="draw('source-atop')">source-atop</el-button><el-button type="danger" size="mini" @click="draw('destination-over')">destination-over</el-button><el-button type="danger" size="mini" @click="draw('destination-in')">destination-in</el-button><el-button type="danger" size="mini" @click="draw('destination-out')">destination-out</el-button><el-button type="danger" size="mini" @click="draw('destination-atop')">destination-atop</el-button><el-button type="success" size="mini" @click="draw('lighter')">lighter</el-button><el-button type="success" size="mini" @click="draw('copy')">copy</el-button><el-button type="success" size="mini" @click="draw('xor')">xor</el-button><el-button type="success" size="mini" @click="draw('multiply')">multiply</el-button><el-button type="success" size="mini" @click="draw('screen')">screen</el-button><el-button type="success" size="mini" @click="draw('overlay')">overlay</el-button><el-button type="success" size="mini" @click="draw('darken')">darken</el-button><el-button type="success" size="mini" @click="draw('lighten')">lighten</el-button><el-button type="warning" size="mini" @click="draw('color-dodge')">color-dodge</el-button><el-button type="warning" size="mini" @click="draw('color-burn')">color-burn</el-button><el-button type="warning" size="mini" @click="draw('hard-light')">hard-light</el-button><el-button type="warning" size="mini" @click="draw('soft-light')">soft-light</el-button><el-button type="warning" size="mini" @click="draw('difference')">difference</el-button><el-button type="warning" size="mini" @click="draw('exclusion')">exclusion</el-button><el-button type="warning" size="mini" @click="draw('hue')">hue</el-button><el-button type="warning" size="mini" @click="draw('saturation')">saturation</el-button><el-button type="warning" size="mini" @click="draw('color')">color</el-button><el-button type="warning" size="mini" @click="draw('luminosity')">luminosity</el-button></h4></div><div class="dajianshi "><canvas id="dajianshi" ref="mycanvas" width="980" height="410"></canvas></div></div>
</template>
<script>export default {data() {return {ctx: null,canvas: null,imageUrl: require('../assets/bg.png'), }},mounted() {this.setCanvas()},methods: {clearCanvas() {				this.ctx.clearRect(-180, -50, this.canvas.width, this.canvas.height);this.ctx.restore();},setCanvas() {this.canvas = document.getElementById('dajianshi');if (!this.canvas.getContext) return;this.ctx = this.canvas.getContext("2d");},draw(type) {this.clearCanvas();this.ctx.save();this.ctx.translate(300,50);const image = new Image();image.src = this.imageUrl;image.addEventListener("load", () => {this.ctx.drawImage(image, 0, 0, 400, 350);					this.ctx.globalCompositeOperation = typethis.rect(this.ctx,100,90,200,150,'blue')});},rect(ctx,x,y,w,h,fillcolor){ctx.fillStyle=fillcolor;ctx.fillRect(x,y,w,h)				},}}
</script>
<style scoped>.djs_container {width: 1000px;height: 680px;margin: 50px auto;border: 1px solid #222;position: relative;}.top {margin: 0 auto 0px;padding: 10px 0;background: #222;color: #fff;}.dajianshi {margin: 5px auto 0;border: 1px solid #cde;width: 980px;height: 410px;}.top>>>.el-button{ margin-bottom: 8px;}
</style>

canvas基本属性

属性属性属性
canvasfillStylefilter
fontglobalAlphaglobalCompositeOperation
heightlineCaplineDashOffset
lineJoinlineWidthmiterLimit
shadowBlurshadowColorshadowOffsetX
shadowOffsetYstrokeStyletextAlign
textBaselinewidth

canvas基础方法

方法方法方法
arc()arcTo()addColorStop()
beginPath()bezierCurveTo()clearRect()
clip()close()closePath()
createImageData()createLinearGradient()createPattern()
createRadialGradient()drawFocusIfNeeded()drawImage()
ellipse()fill()fillRect()
fillText()getImageData()getLineDash()
isPointInPath()isPointInStroke()lineTo()
measureText()moveTo()putImageData()
quadraticCurveTo()rect()restore()
rotate()save()scale()
setLineDash()setTransform()stroke()
strokeRect()strokeText()transform()
translate()
http://www.ds6.com.cn/news/10998.html

相关文章:

  • wordpress网站amp百度关键词搜索次数
  • 网络运营计划方案搜索引擎优化英文简称
  • 软件测试培训心得拼多多关键词优化是怎么弄的
  • wordpress仿fe素材什么是优化
  • 小程序商店推荐百度seo关键词点击软件
  • 域名不作网站用途推广网站有效的方法
  • 南海做网站seo网站关键词优化工具
  • 蓝色系 网站百度公司
  • 深圳自建网站网络舆情监控系统
  • 电子商城网站建设费用天津网站建设
  • 临沂网站建设熊掌号网络营销推广方式包括
  • 衢州市建设局网站windows优化大师怎么彻底删除
  • 制作app需要网站吗自助优化排名工具
  • 网站建设总结ppt目前引流最好的平台
  • dw做网站教程视频jsurl转码
  • 福千欣隆网站建设公司怎么样自媒体135的网站是多少
  • 500万注册公司算大吗邯郸seo营销
  • 会同县做网站aso优化哪家好
  • 路由器建wordpress商品关键词怎么优化
  • 外贸网站推广怎样做网络营销推广软件
  • 网站维护需要用到哪些知识西安seo顾问公司
  • 温州快建网站学seo如何入门
  • 做章网站百度怎么推广自己的产品
  • 湖南网站优化公司百度推广费用可以退吗
  • 可以做推广的门户网站个人网站制作源代码
  • 珠海网页设计公司郑州seo优化哪家好
  • 广州市研发网站建设价格免费推广网址
  • 青岛网站建设找润商石家庄网站建设案例
  • 网站建设考虑哪些因素2022当下社会热点话题
  • 广州天河区房价2022年最新房价南昌seo数据监控