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

网站建设总体规划包括哪些济南成之运维网络科技

网站建设总体规划包括哪些,济南成之运维网络科技,郑州影视公司有哪些,saas系统怎么读ArkTS卡片开放了自定义绘制的能力#xff0c;在卡片上可以通过Canvas组件创建一块画布#xff0c;然后通过CanvasRenderingContext2D对象在画布上进行自定义图形的绘制#xff0c;如下示例代码实现了在画布的中心绘制了一个笑脸。 Entry Component struct Card { private c…ArkTS卡片开放了自定义绘制的能力在卡片上可以通过Canvas组件创建一块画布然后通过CanvasRenderingContext2D对象在画布上进行自定义图形的绘制如下示例代码实现了在画布的中心绘制了一个笑脸。 Entry Component struct Card { private canvasWidth: number 0; private canvasHeight: number 0; // 初始化CanvasRenderingContext2D和RenderingContextSettings private settings: RenderingContextSettings new RenderingContextSettings(true); private context: CanvasRenderingContext2D new CanvasRenderingContext2D(this.settings);build() { Column() { Row() { Canvas(this.context) .margin(5%) .width(90%) .height(90%) .onReady(() { console.info([ArkTSCard] onReady for canvas draw content); // 在onReady回调中获取画布的实际宽和高 this.canvasWidth this.context.width; this.canvasHeight this.context.height; // 绘制画布的背景 this.context.fillStyle rgba(203, 154, 126, 1.00); this.context.fillRect(0, 0, this.canvasWidth, this.canvasHeight); // 在画布的中心绘制一个红色的圆 this.context.beginPath(); let radius this.context.width / 3 let circleX this.context.width / 2 let circleY this.context.height / 2 this.context.moveTo(circleX - radius, circleY); this.context.arc(circleX, circleY, radius, 2 * Math.PI, 0, true); this.context.closePath(); this.context.fillStyle red; this.context.fill(); // 绘制笑脸的左眼 let leftR radius / 4 let leftX circleX - (radius / 2) let leftY circleY - (radius / 3.5) this.context.beginPath(); this.context.arc(leftX, leftY, leftR, 0, Math.PI, true); this.context.strokeStyle #ffff00 this.context.lineWidth 10 this.context.stroke() // 绘制笑脸的右眼 let rightR radius / 4 let rightX circleX (radius / 2) let rightY circleY - (radius / 3.5) this.context.beginPath(); this.context.arc(rightX, rightY, rightR, 0, Math.PI, true); this.context.strokeStyle #ffff00 this.context.lineWidth 10 this.context.stroke() // 绘制笑脸的嘴巴 let mouthR radius / 2.5 let mouthX circleX let mouthY circleY (radius / 3) this.context.beginPath(); this.context.arc(mouthX, mouthY, mouthR, Math.PI, 0, true); this.context.strokeStyle #ffff00 this.context.lineWidth 10 this.context.stroke() }) } }.height(100%).width(100%) } }
http://www.ho-use.cn/article/10816652.html

相关文章:

  • 做的比较好的二手交易网站有哪些免费搭建个人网站的3种实用方法
  • 企业把网站关闭原因没有地址如何注册公司
  • 东莞企业网站建设多少钱湖州seo排名
  • 陕西省建设部官方网站网站建设应该学什么
  • 建设网站需求文档免费软件下载官方网站
  • 小创业公司网站怎么做企业网站推广的主要方法
  • 企业大型网站开发设计建站流程阿里做网站
  • 怎么让公司网站显示官网北京微网站建设设计服务
  • 福州网站建设公司哪个好威海建设集团网站
  • 网站建设 工作室做网站站长一年能赚多少钱
  • 网站pc端建设怎么做盗版电影网站吗
  • 厦门模板建站系统中国空间站朋友圈
  • 企业交易平台的网站制作多少钱把网站放到域名上
  • 什么是网站维护中湛江seo哪家好
  • html网站开发实用技术曲沃县建站塔山双喜
  • 服务器搭建网站环境厦门网站设计定制
  • 天津网站制作推广企业邮箱888
  • 青海做网站的公司邢台交友吧
  • 成都医院网站建设黄山工程建设信息网站
  • 有空间有域名怎么做网站wordpress cufon
  • 沈阳网站关键词优化服务好新闻发稿平台
  • 广州传业建设有限公司网站网站子栏目设计
  • 手机网站域名m打头网站的手机客户端怎样做
  • 手游网站怎么做北京营销型网站建设哪家好
  • 啥也不懂怎么建设网站个人网站开发软件
  • 宁夏找人做网站多少钱网络营销是什么加什么
  • 百度商桥网站代码去哪里添加山门做网站
  • 贵阳网站设计与开发怎么做百度云服务器建设网站
  • 专业建站公司的业务内容有哪些公司网站怎么建立
  • 曲阜住房城乡建设局网站网页公司制作