From 00802b496b76c95d4cfb5405d1100f4d0db8a4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 15 Apr 2005 12:26:10 +0000 Subject: [PATCH] even more convenience functions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12413 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/servers/app/PatternHandler.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/headers/private/servers/app/PatternHandler.h b/headers/private/servers/app/PatternHandler.h index 4544b422bb..f71635838a 100644 --- a/headers/private/servers/app/PatternHandler.h +++ b/headers/private/servers/app/PatternHandler.h @@ -70,6 +70,9 @@ class Pattern { bool operator==(const Pattern& other) const { return fPattern.type64 == other.fPattern.type64; } + bool operator==(const pattern& other) const + { return fPattern.type64 == *(uint64*)other.data; } + private: typedef union @@ -129,6 +132,8 @@ class PatternHandler { bool IsHighColor(const BPoint& pt) const; inline bool IsHighColor(int x, int y) const; + inline bool IsSolid() const + { return fPattern == B_SOLID_HIGH || fPattern == B_SOLID_LOW; } const pattern* GetR5Pattern(void) const { return (const pattern*)fPattern.GetInt8(); }