Qt3DRender::QColorMask Class

class Qt3DRender::QColorMask

允许指定哪些颜色组件应写入当前绑定的帧缓冲区。更多

头文件: #include <QColorMask>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML 中: ColorMask
继承: Qt3DRender::QRenderState
状态:已废弃

属性

公共功能

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

公共插槽

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

信号

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

详细说明

默认情况下,每个颜色组件(红、绿、蓝、alpha)的属性都设置为true ,这意味着它们将被写入帧缓冲区。将任何颜色分量设置为false 都将阻止其写入帧缓冲区。

属性文档

alphaMasked : bool

确定是否要将 alphaMasked 元件写入帧缓冲区。

访问功能:

bool isAlphaMasked() const
void setAlphaMasked(bool alphaMasked)

通知信号:

void alphaMaskedChanged(bool alphaMasked)

blueMasked : bool

表示是否将蓝色分量写入帧缓冲区。

访问功能:

bool isBlueMasked() const
void setBlueMasked(bool blueMasked)

通知信号:

void blueMaskedChanged(bool blueMasked)

greenMasked : bool

表示是否将绿色分量写入帧缓冲区。

访问功能:

bool isGreenMasked() const
void setGreenMasked(bool greenMasked)

通知信号:

void greenMaskedChanged(bool greenMasked)

redMasked : bool

表示是否将红色分量写入帧缓冲区。

访问功能:

bool isRedMasked() const
void setRedMasked(bool redMasked)

Notifier 信号:

void redMaskedChanged(bool redMasked)

成员函数 文档

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

构造一个新的 Qt3DCore::QColorMask 实例,parent 作为父类。

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