add vcglib
This commit is contained in:
1 parent
6f6c0c8eb7
commit
af8100f851
1537 files changed
+634197
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#ifndef COL_QT_CONVERT_H_
|
||||
#define COL_QT_CONVERT_H_
|
||||
|
||||
#include <QColor>
|
||||
#include "../../vcg/space/color4.h"
|
||||
|
||||
namespace vcg
|
||||
{
|
||||
class ColorConverter
|
||||
{
|
||||
public:
|
||||
inline static vcg::Color4b ToColor4b(const QColor& col)
|
||||
{
|
||||
return vcg::Color4b(col.red(),col.green(),col.blue(),col.alpha());
|
||||
}
|
||||
|
||||
inline static QColor ToQColor(const vcg::Color4b& col)
|
||||
{
|
||||
return QColor(col[0],col[1],col[2],col[3]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user