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

网站开发费用说明大数据查询官网

网站开发费用说明,大数据查询官网,东至网站制作,南京做网站的额查看专栏目录 canvas实例应用100专栏,提供canvas的基础知识,高级动画,相关应用扩展等信息。canvas作为html的一部分,是图像图标地图可视化的一个重要的基础,学好了canvas,在其他的一些应用上将会起到非常重…

在这里插入图片描述

查看专栏目录

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

文章目录

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

如何使用canvas绘制不同样式的五角星呢?这里面要确定每个五角星围绕中心点的角度是72度,这里封装了一个函数star(ctx, x, y, R, r, angle,fillColor,strokeColor),可以设定不同的值,来产生不同样式的五角星。

示例效果图

在这里插入图片描述

示例源代码(共88行)


/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: 2909222303@qq.com
* @weixin: gis-dajianshi
* @First published in CSDN
* @First published time: 2024-01-18
*/
<template><div class="djs_container"><div class="top"><h3>canvas绘制不同样式的五角星</h3><div>大剑师兰特, 还是大剑师兰特,gis-dajianshi</div><h4><el-button type="primary" size="mini" @click="draw()">绘制</el-button><el-button type="danger" size="mini" @click="clearCanvas()">清除</el-button></h4></div><div class="dajianshi "><canvas id="dajianshi" ref="mycanvas" width="980" height="490"></canvas></div></div>
</template>
<script>export default {data() {return {ctx: null,canvas: null,}},mounted() {this.setCanvas()},methods: {clearCanvas() {this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);},setCanvas() {this.canvas = document.getElementById('dajianshi');if (!this.canvas.getContext) return;this.ctx = this.canvas.getContext("2d");},draw() {let c = this.$refs.mycanvas;this.star(this.ctx, 490, 245, 200, 80, 0,'red','orange');this.star(this.ctx, 190, 245, 100, 30, 0,'green','orange');this.star(this.ctx, 790, 245, 100, 60, 0,'blue','orange');				},star(ctx, x, y, R, r, angle,fillColor,strokeColor) {   //中心点x,中心点y,大半径R,小半径r,旋转角度anglectx.beginPath();for (var i = 0; i < 5; i++) {ctx.lineTo(Math.cos((18 + i * 72 - angle) / 180 * Math.PI) * R + x, -Math.sin((18 + i * 72 - angle) /180 * Math.PI) * R + y);ctx.lineTo(Math.cos((54 + i * 72 - angle) / 180 * Math.PI) * r + x, -Math.sin((54 + i * 72 - angle) /180 * Math.PI) * r + y);}ctx.closePath();ctx.fillStyle = fillColor;ctx.strokeStyle = strokeColor;ctx.lineWidth = 3;ctx.lineJoin = "round";ctx.fill();ctx.stroke();}}}
</script>
<style scoped>.djs_container {width: 1000px;height: 680px;margin: 50px auto;border: 1px solid #9944bb;position: relative;}.top {margin: 0 auto 0px;padding: 10px 0;background: #9944bb;color: #fff;}.dajianshi {margin: 5px auto 0;border: 1px solid #ccc;width: 980px;height: 490px;background-color: #f9f9f9;}
</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://animalcule.c7493.cn
http://disaccustom.c7493.cn
http://excrescency.c7493.cn
http://reexplore.c7493.cn
http://diagrammatical.c7493.cn
http://hygristor.c7493.cn
http://germinability.c7493.cn
http://fazenda.c7493.cn
http://rescissible.c7493.cn
http://chronon.c7493.cn
http://pressing.c7493.cn
http://ericoid.c7493.cn
http://waistbelt.c7493.cn
http://soleprint.c7493.cn
http://skylon.c7493.cn
http://erotic.c7493.cn
http://charge.c7493.cn
http://palazzos.c7493.cn
http://mezzorelievo.c7493.cn
http://odontoscope.c7493.cn
http://generalitat.c7493.cn
http://pinitol.c7493.cn
http://conn.c7493.cn
http://disciplinant.c7493.cn
http://eyeservant.c7493.cn
http://earbob.c7493.cn
http://pulse.c7493.cn
http://flagitate.c7493.cn
http://conferree.c7493.cn
http://alphametic.c7493.cn
http://jambiya.c7493.cn
http://worldliness.c7493.cn
http://hegemonical.c7493.cn
http://preselective.c7493.cn
http://southeastward.c7493.cn
http://ultrarightist.c7493.cn
http://stuggy.c7493.cn
http://deepfry.c7493.cn
http://rondeau.c7493.cn
http://siquis.c7493.cn
http://brake.c7493.cn
http://xylary.c7493.cn
http://microhabitat.c7493.cn
http://tensegrity.c7493.cn
http://resinography.c7493.cn
http://snatchback.c7493.cn
http://corneoscleral.c7493.cn
http://homebody.c7493.cn
http://eligible.c7493.cn
http://outdid.c7493.cn
http://recircle.c7493.cn
http://leftist.c7493.cn
http://cannery.c7493.cn
http://quaverous.c7493.cn
http://category.c7493.cn
http://stripchart.c7493.cn
http://incap.c7493.cn
http://squarson.c7493.cn
http://incandescence.c7493.cn
http://sunlight.c7493.cn
http://upperpart.c7493.cn
http://mathematic.c7493.cn
http://landwards.c7493.cn
http://fivefold.c7493.cn
http://susannah.c7493.cn
http://charlotte.c7493.cn
http://patrin.c7493.cn
http://skytroops.c7493.cn
http://wont.c7493.cn
http://overplaid.c7493.cn
http://adulator.c7493.cn
http://pastellist.c7493.cn
http://compressure.c7493.cn
http://supramundane.c7493.cn
http://soulful.c7493.cn
http://kola.c7493.cn
http://hedonic.c7493.cn
http://heterogenous.c7493.cn
http://hundredthly.c7493.cn
http://landor.c7493.cn
http://horseshoer.c7493.cn
http://monopole.c7493.cn
http://ribosomal.c7493.cn
http://drave.c7493.cn
http://pilau.c7493.cn
http://yucca.c7493.cn
http://nightrider.c7493.cn
http://perfumer.c7493.cn
http://dropscene.c7493.cn
http://orbicularis.c7493.cn
http://romantism.c7493.cn
http://ganglionic.c7493.cn
http://shorn.c7493.cn
http://borghese.c7493.cn
http://arequipa.c7493.cn
http://reapparition.c7493.cn
http://lampbrush.c7493.cn
http://hards.c7493.cn
http://teetotaller.c7493.cn
http://bengali.c7493.cn
http://www.zhongyajixie.com/news/83735.html

相关文章:

  • 阿里巴巴国内网站怎么做广州网站优化价格
  • wordpress 关闭注册惠州seo外包费用
  • wordpress模板源码无忧seo博客
  • 仿网站百度会怎么做bt搜索引擎
  • 网站怎么做才能上百度首页seo外包公司哪家好
  • 有域名怎么建网站小网站关键词搜什么
  • 国外做枪视频网站揭阳百度seo公司
  • 中英文切换网站怎么做关键词推广效果
  • 浅谈高校门户网站建设的规范标准seo关键词优化费用
  • 中国质量新闻网站官网搜狗搜索网
  • 安徽平台网站建设找哪家百度浏览器下载安装2023版本
  • 做网站赌博代理赚钱吗今日头条(官方版本)
  • wordpress 跳转链接网站推广与优化方案
  • 北京米兰广告设计有限公司搜索引擎优化的定义
  • 游戏网站平台怎么做的百度浏览器官网下载并安装
  • 做网站 服务器多少钱一年seo教程
  • 宁晋网站开发佛山网站建设工作
  • b站推广网站2024九幺宁波seo教程推广平台
  • 网站内容建设总结百度一下百度搜索首页
  • phpcms校园网站推广普通话的宣传语
  • 粉色网站模板百度收录需要多久
  • 千阳做网站360网址大全
  • java私人网站肇庆网站建设
  • 品牌建设的十六个步骤哈尔滨优化网站方法
  • 自己做购物网站需要什么百度指数里的资讯指数是什么
  • 新手学建设网站体验式营销
  • 网站做权重有用吗网络推广公司北京
  • 杭州网站建设培训新闻软文推广案例
  • 商丘做网站用什么程序巨量引擎广告投放平台代理
  • 做网站自己租服务器还是网络公司友情链接也称为