随笔分类 - canvas
存canvas 代码
摘要:公司盖章 <html> <head> <meta charset="utf-8"> </head> <style type="text/css" name="文字盖章"> .seal-content { width: 300px; min-height: 60px; vertical-align:
阅读全文
摘要:中国地图 项目地址和预览地址在下面 通过echarts实现,根据echarts官方文档进行DIY. 注意一定要导入china.js。不然会报红的。 这里就不展示代码片段了 项目地址:https://gitee.com/sunliusen/china-map-echarts 预览 预览地址:http:
阅读全文
摘要:直接上代码 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>点子签名</title>
阅读全文
摘要:html <canvas id="canvas" width="596" height="596"></canvas> JS const round = () => { return new Promise((reslove,error)=>{ const canvas = document.que
阅读全文
摘要:#存码 有补充联系我,或在下方评论补充 代码片段 const text = obj => { //插入文字 return new Promise((resolve, reject)=>{ obj.ctx.save(); obj.ctx.fillStyle=obj.color||"blue"; obj
阅读全文
摘要:canvas实现图片圆边 参考资料: https://www.cnblogs.com/lanshengzhong/p/8609945.html 效果 源代码 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="view
阅读全文
摘要:绘制自动换行的字符串 drawText(ctx, txtwid, t, x, y, w){ var chr = t.split(""); var temp = ""; var row = []; ctx.font = "20px Arial"; ctx.fillStyle = "black"; ct
阅读全文
摘要:vue脚手架 <template> <div class="s-canvas"> <canvas id="s-canvas" :width="contentWidth" :height="contentHeight"></canvas> </div> </template> <script> con
阅读全文
摘要:网络图片缓存 在uni中wx可以用uni代替 无区别; 先把要插入的网络图片缓存(getImageInfo); let context = uni.createCanvasContext('firstCanvas'); //canvas-id='firstCanvas' uni.getImageIn
阅读全文