File: col_qt_convert.h

package info (click to toggle)
meshlab 1.3.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 21,096 kB
  • ctags: 33,630
  • sloc: cpp: 224,813; ansic: 8,170; xml: 119; makefile: 80
file content (24 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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