The QSGFlatColorMaterial class provides a convenient way of rendering solid colored geometry in the scene graph. More...
Header: | #include <QSGFlatColorMaterial> |
qmake: | QT += quick |
Inherits: | QSGMaterial |
QSGFlatColorMaterial() | |
const QColor & | color() const |
void | setColor(const QColor &color) |
The QSGFlatColorMaterial class provides a convenient way of rendering solid colored geometry in the scene graph.
Warning: This utility class is only functional when running with the OpenGL 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 QSGGeometry::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.
Constructs a new flat color material.
The default color is white.
Returns this flat color material's color.
The default color is white.
See also setColor().
Sets this flat color material's color to color.
See also color().
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: