qml 画的问题

来源:互联网 发布:中端单反推荐 知乎 编辑:程序博客网 时间:2024/04/29 12:09
http://qt-project.org/doc/qt-4.8/qtwebkit-guide-canvas.html




QtWebKit Guide - Canvas Graphics

Canvas Graphics

This section of the QtWebKit Guide serves as an introduction to the HTML5 Canvas API features of QtWebKit.

The HTML5 Canvas API enables you to draw within a Web page or Web App using JavaScript. After you define a rectangle that serves as your drawing canvas, you can draw straight and curved lines, simple and complex shapes, graphs, and referenced graphic images. You can add text, color, shadows, gradients, and patterns. The canvas API also enables you to save or export the canvas as a .png or .jpeg image file.

To define the drawing area, set the width and height of a <canvas> element. For example, the following sets a drawing area with a height of 100 pixels and width of 200 pixels:

 <canvas id="mycanvas" width="100" height="200"></canvas>

0 0