implemented ColorValueViewer

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@56 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-28 12:55:56 +00:00
parent 275f715463
commit e55cecb898
8 changed files with 269 additions and 7 deletions
+1
View File
@@ -31,6 +31,7 @@ class Defaultable {
/// Get access to the value
inline const T& operator () () const { return value; }
inline const T& get () const { return value; }
/// Is this value in the default state?
inline bool isDefault() const { return is_default; }
+7
View File
@@ -93,6 +93,9 @@ class RealRect {
/// Size of the rectangle
RealSize size;
inline RealRect(const wxRect& rect)
: position(rect.x, rect.y), size(rect.width, rect.height)
{}
inline RealRect(const RealPoint& position, const RealSize& size)
: position(position), size(size)
{}
@@ -107,6 +110,10 @@ class RealRect {
inline RealRect grow(double amount) {
return RealRect(position.x - amount, position.y - amount, size.width + 2 * amount, size.height + 2 * amount);
}
inline RealRect operator + (const RealRect& r) const {
return RealRect(position + r.position, size + r.size);
}
};
// ----------------------------------------------------------------------------- : Operators
+2
View File
@@ -136,6 +136,8 @@ class RotatedDC : public Rotation {
RealSize GetTextExtent(const String& text);
inline wxDC& getDC() { return dc; }
private:
wxDC& dc; ///< The actual dc
bool high_quality; ///< Drawing using our own anti aliassing?