qml 畫的問題

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>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章