QColorMask Class

class Qt3DRender::QColorMask

Allows specifying which color components should be written to the currently bound frame buffer. More...

Header: #include <QColorMask>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
Instantiated By: ColorMask
Inherits: Qt3DRender::QRenderState

Properties

Public Functions

QColorMask(Qt3DCore::QNode *parent = nullptr)
bool isAlphaMasked() const
bool isBlueMasked() const
bool isGreenMasked() const
bool isRedMasked() const

Public Slots

void setAlphaMasked(bool alphaMasked)
void setBlueMasked(bool blueMasked)
void setGreenMasked(bool greenMasked)
void setRedMasked(bool redMasked)

Signals

void alphaMaskedChanged(bool alphaMasked)
void blueMaskedChanged(bool blueMasked)
void greenMaskedChanged(bool greenMasked)
void redMaskedChanged(bool redMasked)

Detailed Description

By default, the property for each color component (red, green, blue, alpha) is set to true which means they will be written to the frame buffer. Setting any of the color component to false will prevent it from being written into the frame buffer.

Property Documentation

alphaMasked : bool

Holds whether the alphaMasked component should be written to the frame buffer.

Access functions:

bool isAlphaMasked() const
void setAlphaMasked(bool alphaMasked)

Notifier signal:

void alphaMaskedChanged(bool alphaMasked)

blueMasked : bool

Holds whether the blue color component should be written to the frame buffer.

Access functions:

bool isBlueMasked() const
void setBlueMasked(bool blueMasked)

Notifier signal:

void blueMaskedChanged(bool blueMasked)

greenMasked : bool

Holds whether the green color component should be written to the frame buffer.

Access functions:

bool isGreenMasked() const
void setGreenMasked(bool greenMasked)

Notifier signal:

void greenMaskedChanged(bool greenMasked)

redMasked : bool

Holds whether the red color component should be written to the frame buffer.

Access functions:

bool isRedMasked() const
void setRedMasked(bool redMasked)

Notifier signal:

void redMaskedChanged(bool redMasked)

Member Function Documentation

[explicit] QColorMask::QColorMask(Qt3DCore::QNode *parent = nullptr)

Constructs a new Qt3DCore::QColorMask instance with parent as parent.

© 2023 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.