Nesta página

Qt Canvas2D QML types

Este módulo está em pré-visualização tecnológica e está sujeito a alterações.

Este módulo foi introduzido no Qt 6.12.

Este módulo QML contém um elemento ` Canvas2D ` para ` Qt Quick`. Para usar o ` Canvas2D`, importe o módulo com a seguinte linha:

import QtCanvas2D

Tipos QML do Canvas2D

Canvas2D

Fornece um item de tela 2D que permite desenhar via JavaScript

Canvas2DContext

Fornece um contexto 2D para desenhar em um item Canvas2D

boxgradient2d

Fornece o tipo `boxgradient2d`, correspondente ao `QCanvasBoxGradient`

boxshadow2d

Fornece o tipo `boxshadow2d`, correspondente ao `QCanvasBoxShadow`

conicalgradient2d

Fornece o tipo `conicalgradient2d`, correspondente a `QCanvasConicalGradient`

gridpattern2d

Fornece o tipo `gridpattern2d`, compatível com `QCanvasGridPattern`

imagepattern2d

Oferece correspondência de tipo `imagepattern2d` com `QCanvasImagePattern`

lineargradient2d

Fornece correspondência do tipo `lineargradient2d` para `QCanvasLinearGradient`

path2d

Fornece o tipo `path2d`, um contêiner de caminho de pintura correspondente a `QCanvasPath`

radialgradient2d

Fornece correspondência do tipo `radialgradient2d` para `QCanvasRadialGradient`

transform2d

Fornece o tipo `transform2d`, uma matriz de transformação 2D 3x3, correspondente ao `QTransform`

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. 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.