mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Dominant Color and Mean Color Squared
This commit is contained in:
		| @@ -6,6 +6,7 @@ | ||||
|  | ||||
| #include <QString> | ||||
| #include <QTextStream> | ||||
| #include <QRgb> | ||||
|  | ||||
| /// | ||||
| /// Plain-Old-Data structure containing the red-green-blue color specification. Size of the | ||||
| @@ -52,6 +53,18 @@ struct ColorRgb | ||||
| 		return a; | ||||
| 	} | ||||
|  | ||||
| 	QRgb rgb() const | ||||
| 	{ | ||||
| 		return qRgb(red,green,blue); | ||||
| 	} | ||||
|  | ||||
| 	void setRgb(QRgb rgb) | ||||
| 	{ | ||||
| 		red = static_cast<uint8_t>(qRed(rgb)); | ||||
| 		green = static_cast<uint8_t>(qGreen(rgb)); | ||||
| 		blue = static_cast<uint8_t>(qBlue(rgb)); | ||||
| 	} | ||||
|  | ||||
| 	QString toQString() const | ||||
| 	{ | ||||
| 		return QString("(%1,%2,%3)").arg(red).arg(green).arg(blue); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user