Add GetColor15 to RGBColor

Prep DisplayDriver for consolidated driver code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5244 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shadow303
2003-11-03 01:55:14 +00:00
parent a8cb43fea1
commit a2d01f224f
2 changed files with 32 additions and 1 deletions
@@ -78,6 +78,31 @@ typedef struct
#endif
class AccLineCalc
{
public:
AccLineCalc();
AccLineCalc(const BPoint &pta, const BPoint &ptb);
void SetPoints(const BPoint &pta, const BPoint &ptb);
float GetX(float y);
float GetY(float x);
float Slope(void) { return slope; }
float Offset(void) { return offset; }
float MinX();
float MinY();
float MaxX();
float MaxY();
void Swap(AccLineCalc &from);
private:
float slope;
float offset;
BPoint start, end;
float minx;
float miny;
float maxx;
float maxy;
};
/*!
\class DisplayDriver DisplayDriver.h
\brief Mostly abstract class which handles all graphics output for the server.
@@ -170,6 +195,10 @@ protected:
void _SetDPMSCapabilities(uint32 caps);
void _SetDPMSState(uint32 state);
ServerCursor *_GetCursor(void);
virtual void HLine(int32 x1, int32 x2, int32 y, PatternHandler *pat);
virtual void HLineThick(int32 x1, int32 x2, int32 y, int32 thick, PatternHandler *pat);
virtual void SetPixel(int x, int y, RGBColor col);
virtual void SetThickPixel(int x, int y, int thick, PatternHandler *pat);
private:
BLocker *_locker;
+3 -1
View File
@@ -52,6 +52,7 @@ public:
void PrintToStream(void) const;
uint8 GetColor8(void);
uint16 GetColor15(void);
uint16 GetColor16(void);
rgb_color GetColor32(void) const;
@@ -71,8 +72,9 @@ public:
protected:
rgb_color color32;
uint16 color16;
uint16 color15;
uint8 color8;
bool update8,update16;
bool update8,update15,update16;
};
#endif