mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
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:
@@ -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; }
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user