PySide6.QtQuick.QSGFlatColorMaterial

class QSGFlatColorMaterial

The QSGFlatColorMaterial class provides a convenient way of rendering solid colored geometry in the scene graph.

Details

Warning

This utility class is only functional when running with the default backend of the Qt Quick scenegraph.

The flat color material will fill every pixel in a geometry using a solid color. The color can contain transparency.

The geometry to be rendered with a flat color material requires vertices in attribute location 0 in the QSGGeometry object to render correctly. The defaultAttributes_Point2D() returns an attribute set compatible with this material.

The flat color material respects both current opacity and current matrix when updating its rendering state.

Inheritance diagram of PySide6.QtQuick.QSGFlatColorMaterial

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

__init__()

Constructs a new flat color material.

The default color is white.

color()
Return type:

QColor

Returns this flat color material’s color.

The default color is white.

See also

setColor()

setColor(color)
Parameters:

colorQColor

Sets this flat color material’s color to color.

See also

color()