<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qquickcanvasitem.cpp --> <title>Obsolete Members for Canvas | Qt Quick 5.12.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtquick-index.html">Qt Quick</a></td><td ><a href="qtquick-qmlmodule.html">QML Types</a></td><td >Obsolete Members for Canvas</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.6 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"><div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">Obsolete Members for Canvas</h1> <p><b>The following members of QML type <a href="qml-qtquick-canvas.html">Canvas</a> are obsolete.</b> They are provided to keep old source code working. We strongly advise against using them in new code.</p> <a name="properties"></a> <h2 id="properties">Properties</h2> <ul> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#available-prop">available</a></b></b> : bool</li> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#canvasSize-prop">canvasSize</a></b></b> : size</li> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#context-prop">context</a></b></b> : object</li> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#contextType-prop">contextType</a></b></b> : string</li> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#renderStrategy-prop">renderStrategy</a></b></b> : enumeration</li> <li class="fn"><b><b><a href="qml-qtquick-canvas.html#renderTarget-prop">renderTarget</a></b></b> : enumeration</li> </ul> <h2>Property Documentation</h2> <!-- $$$available --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="available-prop"> <td class="tblQmlPropNode"><p> <a name="available-prop"></a><span class="name">available</span> : <span class="type">bool</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Indicates when Canvas is able to provide a drawing context to operate on.</p> </div></div><!-- @@@available --> <br/> <!-- $$$canvasSize --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="canvasSize-prop"> <td class="tblQmlPropNode"><p> <a name="canvasSize-prop"></a><span class="name">canvasSize</span> : <span class="type">size</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the logical canvas size that the context paints on.</p> <p>By default, the canvas size is the same size as the current canvas item size.</p> <p>By setting the canvasSize, tileSize and canvasWindow, the Canvas item can act as a large virtual canvas with many separately rendered tile rectangles. Only those tiles within the current canvas window are painted by the Canvas render engine.</p> <p><b>See also </b><a href="qml-qtquick-canvas-obsolete.html#tileSize-prop">tileSize</a> and <a href="qml-qtquick-canvas-obsolete.html#canvasWindow-prop">canvasWindow</a>.</p> </div></div><!-- @@@canvasSize --> <br/> <!-- $$$context --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="context-prop"> <td class="tblQmlPropNode"><p> <a name="context-prop"></a><span class="name">context</span> : <span class="type">object</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the active drawing context.</p> <p>If the canvas is ready and there has been a successful call to <a href="qml-qtquick-canvas.html#getContext-method">getContext()</a> or the <a href="qml-qtquick-canvas.html#contextType-prop">contextType</a> property has been set with a supported context type, this property will contain the current drawing context, otherwise null.</p> </div></div><!-- @@@context --> <br/> <!-- $$$contextType --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="contextType-prop"> <td class="tblQmlPropNode"><p> <a name="contextType-prop"></a><span class="name">contextType</span> : <span class="type">string</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>The type of drawing context to use.</p> <p>This property is set to the name of the active context type.</p> <p>If set explicitly the canvas will attempt to create a context of the named type after becoming available.</p> <p>The type name is the same as used in the <a href="qml-qtquick-canvas.html#getContext-method">getContext()</a> call, for the 2d canvas the value will be "2d".</p> <p><b>See also </b><a href="qml-qtquick-canvas.html#getContext-method">getContext()</a> and <a href="qml-qtquick-canvas.html#available-prop">available</a>.</p> </div></div><!-- @@@contextType --> <br/> <!-- $$$renderStrategy --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="renderStrategy-prop"> <td class="tblQmlPropNode"><p> <a name="renderStrategy-prop"></a><span class="name">renderStrategy</span> : <span class="type">enumeration</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the current canvas rendering strategy.</p> <ul> <li>Canvas.Immediate - context will perform graphics commands immediately in the main UI thread.</li> <li>Canvas.Threaded - context will defer graphics commands to a private rendering thread.</li> <li>Canvas.Cooperative - context will defer graphics commands to the applications global render thread.</li> </ul> <p>This hint is supplied along with <a href="qml-qtquick-canvas.html#renderTarget-prop">renderTarget</a> to the graphics context to determine the method of rendering. A renderStrategy, <a href="qml-qtquick-canvas.html#renderTarget-prop">renderTarget</a> or a combination may not be supported by a graphics context, in which case the context will choose appropriate options and Canvas will signal the change to the properties.</p> <p>Configuration or runtime tests may cause the QML Scene Graph to render in the GUI thread. Selecting <code>Canvas.Cooperative</code>, does not guarantee rendering will occur on a thread separate from the GUI thread.</p> <p>The default value is <code>Canvas.Immediate</code>.</p> <p><b>See also </b><a href="qml-qtquick-canvas.html#renderTarget-prop">renderTarget</a>.</p> </div></div><!-- @@@renderStrategy --> <br/> <!-- $$$renderTarget --> <div class="qmlitem"><div class="qmlproto"> <div class="table"><table class="qmlname"> <tr valign="top" class="odd" id="renderTarget-prop"> <td class="tblQmlPropNode"><p> <a name="renderTarget-prop"></a><span class="name">renderTarget</span> : <span class="type">enumeration</span></p></td></tr> </table></div> </div><div class="qmldoc"><p>Holds the current canvas render target.</p> <ul> <li>Canvas.Image - render to an in memory image buffer.</li> <li>Canvas.FramebufferObject - render to an OpenGL frame buffer</li> </ul> <p>This hint is supplied along with <a href="qml-qtquick-canvas.html#renderStrategy-prop">renderStrategy</a> to the graphics context to determine the method of rendering. A <a href="qml-qtquick-canvas.html#renderStrategy-prop">renderStrategy</a>, renderTarget or a combination may not be supported by a graphics context, in which case the context will choose appropriate options and Canvas will signal the change to the properties.</p> <p>The default render target is <code>Canvas.Image</code>.</p> </div></div><!-- @@@renderTarget --> <br/> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>