fillRect与Canvas对象中的Backgroud图像 [英] fillRect with Backgroud image in Canvas object
本文介绍了fillRect与Canvas对象中的Backgroud图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用Canvas对象FillRect方法可以将背景图像放在矩形上
using Canvas object FillRect method is it possible to put background image on rectangle
感谢
推荐答案
您可以使用模式:
示例:
var pattern = context.createPattern(image, repetition);
context.fillStyle = pattern;
context.fillRect(x, y, width, height);
这篇关于fillRect与Canvas对象中的Backgroud图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文