7 Star 3 Fork 1

wjzhe / mapEditor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
LineItem.qml 850 Bytes
一键复制 编辑 原始数据 按行查看 历史
wjzhe 提交于 2017-02-09 17:24 . 文件格式转为UTF-8
import QtQuick 2.0
Rectangle {
id: root;
Canvas {
contextType: "2d"
visible: true
anchors.fill: parent;
onPaint: {//绘图事件的响应
context.lineWidth=2;
context.strokeStyle="red";
context.fillStyle="blue";
context.beginPath();
context.rect(1,0,12,12);//一定要注意画图的区域不能超过画布的大小,不然会看不到或者只看到一部分
context.fill();
context.stroke();
}
// onPaint: {
// var ctx = getContext("2d");
// ctx.lineWidth = 2;
// ctx.strokeStyle = "red";
// ctx.fillStyle = "blue";
// ctx.beginPath();
// ctx.rect(10, 8, 12, 8);
// ctx.fill();
// ctx.stroke();
// }
}
}
C++
1
https://gitee.com/null_446_4477/mapeditor.git
git@gitee.com:null_446_4477/mapeditor.git
null_446_4477
mapeditor
mapEditor
master

搜索帮助