QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
Qwt3DDrawable类 参考abstract

Abstract base class for Drawables 更多...

#include <qwt3d_drawable.h>

类 Qwt3DDrawable 继承关系图:
Qwt3DAxis Qwt3DColorLegend Qwt3DCoordinateSystem Qwt3DLabel

class  PrivateData
 

Public 成员函数

virtual void draw (const Qwt3DRenderContext &ctx)
 
void attach (Qwt3DDrawable *)
 
void detach (Qwt3DDrawable *)
 
void detachAll ()
 
virtual void setColor (double r, double g, double b, double a=1)
 
virtual void setColor (RGBA rgba)
 
RGBA color () const
 Returns the drawable's color
 

Protected 成员函数

 Qwt3DDrawable (Qwt3DDrawable &&other) noexcept
 
Qwt3DDrawableoperator= (Qwt3DDrawable &&other) noexcept
 

Protected 属性

RGBA m_color
 

详细描述

Abstract base class for Drawables

Drawables are scene-graph nodes rendered during paintGL. They no longer manage legacy GL state. Each drawable receives its rendering resources (shaders, matrices, viewport, coordinate conversion) through a Qwt3DRenderContext passed to draw(), eliminating the former Qwt3DPlot* back-pointer (deferred smell #1, resolved).

成员函数说明

◆ color()

RGBA Qwt3DDrawable::color ( ) const

Returns the drawable's color

返回 drawable 的颜色

返回
RGBA 颜色值

返回 protected 成员 m_color。添加此公有 getter 是为了让兄弟类 (如 Qwt3DAxis 访问 Qwt3DLabel 的 color)能跨对象读取颜色值, 而无需直接访问 protected 成员。C++ 规则下,派生类只能通过 this 访问自身基类的 protected 成员,不能通过另一个兄弟类对象访问。

◆ draw()

void Qwt3DDrawable::draw ( const Qwt3DRenderContext ctx)
virtual

该类的文档由以下文件生成: