added convenience functions to PatternHandler and refactored the setting of the DrawingMode in Painter

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12408 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2005-04-15 10:20:53 +00:00
parent 3d16cf4bce
commit 4da1508aa9
3 changed files with 67 additions and 47 deletions
@@ -66,6 +66,10 @@ class Pattern {
Pattern& operator=(const pattern &from)
{ memcpy(&fPattern.type64, &from, sizeof(pattern)); return *this; }
bool operator==(const Pattern& other) const
{ return fPattern.type64 == other.fPattern.type64; }
private:
typedef union
@@ -128,6 +132,8 @@ class PatternHandler {
const pattern* GetR5Pattern(void) const
{ return (const pattern*)fPattern.GetInt8(); }
const Pattern& GetPattern(void) const
{ return fPattern; }
private:
Pattern fPattern;
RGBColor fHighColor;