Updated indentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,159 +13,153 @@
|
|||||||
#include "RemoteHWInterface.h"
|
#include "RemoteHWInterface.h"
|
||||||
#include "ServerFont.h"
|
#include "ServerFont.h"
|
||||||
|
|
||||||
class BPoint;
|
|
||||||
class BRect;
|
|
||||||
class BRegion;
|
|
||||||
|
|
||||||
class ServerBitmap;
|
|
||||||
|
|
||||||
class RemoteDrawingEngine : public DrawingEngine {
|
class RemoteDrawingEngine : public DrawingEngine {
|
||||||
public:
|
public:
|
||||||
RemoteDrawingEngine(
|
RemoteDrawingEngine(
|
||||||
RemoteHWInterface* interface);
|
RemoteHWInterface* interface);
|
||||||
virtual ~RemoteDrawingEngine();
|
virtual ~RemoteDrawingEngine();
|
||||||
|
|
||||||
// HWInterfaceListener interface
|
// HWInterfaceListener interface
|
||||||
virtual void FrameBufferChanged();
|
virtual void FrameBufferChanged();
|
||||||
|
|
||||||
virtual void SetCopyToFrontEnabled(bool enabled);
|
virtual void SetCopyToFrontEnabled(bool enabled);
|
||||||
|
|
||||||
// for screen shots
|
// for screen shots
|
||||||
virtual status_t ReadBitmap(ServerBitmap* bitmap,
|
virtual status_t ReadBitmap(ServerBitmap* bitmap,
|
||||||
bool drawCursor, BRect bounds);
|
bool drawCursor, BRect bounds);
|
||||||
|
|
||||||
// clipping for all drawing functions, passing a NULL region
|
// clipping for all drawing functions, passing a NULL region
|
||||||
// will remove any clipping (drawing allowed everywhere)
|
// will remove any clipping (drawing allowed everywhere)
|
||||||
virtual void ConstrainClippingRegion(const BRegion* region);
|
virtual void ConstrainClippingRegion(const BRegion* region);
|
||||||
|
|
||||||
virtual void SetDrawState(const DrawState* state,
|
virtual void SetDrawState(const DrawState* state,
|
||||||
int32 xOffset = 0, int32 yOffset = 0);
|
int32 xOffset = 0, int32 yOffset = 0);
|
||||||
|
|
||||||
virtual void SetHighColor(const rgb_color& color);
|
virtual void SetHighColor(const rgb_color& color);
|
||||||
virtual void SetLowColor(const rgb_color& color);
|
virtual void SetLowColor(const rgb_color& color);
|
||||||
virtual void SetPenSize(float size);
|
virtual void SetPenSize(float size);
|
||||||
virtual void SetStrokeMode(cap_mode lineCap,
|
virtual void SetStrokeMode(cap_mode lineCap,
|
||||||
join_mode joinMode, float miterLimit);
|
join_mode joinMode, float miterLimit);
|
||||||
virtual void SetPattern(const struct pattern& pattern);
|
virtual void SetPattern(const struct pattern& pattern);
|
||||||
virtual void SetDrawingMode(drawing_mode mode);
|
virtual void SetDrawingMode(drawing_mode mode);
|
||||||
virtual void SetDrawingMode(drawing_mode mode,
|
virtual void SetDrawingMode(drawing_mode mode,
|
||||||
drawing_mode& oldMode);
|
drawing_mode& oldMode);
|
||||||
virtual void SetBlendingMode(source_alpha srcAlpha,
|
virtual void SetBlendingMode(source_alpha srcAlpha,
|
||||||
alpha_function alphaFunc);
|
alpha_function alphaFunc);
|
||||||
virtual void SetFont(const ServerFont& font);
|
virtual void SetFont(const ServerFont& font);
|
||||||
virtual void SetFont(const DrawState* state);
|
virtual void SetFont(const DrawState* state);
|
||||||
|
|
||||||
// drawing functions
|
// drawing functions
|
||||||
virtual void InvertRect(BRect rect);
|
virtual void InvertRect(BRect rect);
|
||||||
|
|
||||||
virtual void DrawBitmap(ServerBitmap* bitmap,
|
virtual void DrawBitmap(ServerBitmap* bitmap,
|
||||||
const BRect& bitmapRect,
|
const BRect& bitmapRect,
|
||||||
const BRect& viewRect, uint32 options = 0);
|
const BRect& viewRect, uint32 options = 0);
|
||||||
|
|
||||||
// drawing primitives
|
// drawing primitives
|
||||||
virtual void DrawArc(BRect rect, const float& angle,
|
virtual void DrawArc(BRect rect, const float& angle,
|
||||||
const float& span, bool filled);
|
const float& span, bool filled);
|
||||||
virtual void FillArc(BRect rect, const float& angle,
|
virtual void FillArc(BRect rect, const float& angle,
|
||||||
const float& span,
|
const float& span,
|
||||||
const BGradient& gradient);
|
const BGradient& gradient);
|
||||||
|
|
||||||
virtual void DrawBezier(BPoint* points, bool filled);
|
virtual void DrawBezier(BPoint* points, bool filled);
|
||||||
virtual void FillBezier(BPoint* points,
|
virtual void FillBezier(BPoint* points,
|
||||||
const BGradient& gradient);
|
const BGradient& gradient);
|
||||||
|
|
||||||
virtual void DrawEllipse(BRect rect, bool filled);
|
virtual void DrawEllipse(BRect rect, bool filled);
|
||||||
virtual void FillEllipse(BRect rect,
|
virtual void FillEllipse(BRect rect,
|
||||||
const BGradient& gradient);
|
const BGradient& gradient);
|
||||||
|
|
||||||
virtual void DrawPolygon(BPoint* pointList, int32 numPoints,
|
virtual void DrawPolygon(BPoint* pointList, int32 numPoints,
|
||||||
BRect bounds, bool filled, bool closed);
|
BRect bounds, bool filled, bool closed);
|
||||||
virtual void FillPolygon(BPoint* pointList, int32 numPoints,
|
virtual void FillPolygon(BPoint* pointList, int32 numPoints,
|
||||||
BRect bounds, const BGradient& gradient,
|
BRect bounds, const BGradient& gradient,
|
||||||
bool closed);
|
bool closed);
|
||||||
|
|
||||||
// these rgb_color versions are used internally by the server
|
// these rgb_color versions are used internally by the server
|
||||||
virtual void StrokePoint(const BPoint& point,
|
virtual void StrokePoint(const BPoint& point,
|
||||||
const rgb_color& color);
|
const rgb_color& color);
|
||||||
virtual void StrokeRect(BRect rect, const rgb_color &color);
|
virtual void StrokeRect(BRect rect, const rgb_color &color);
|
||||||
virtual void FillRect(BRect rect, const rgb_color &color);
|
virtual void FillRect(BRect rect, const rgb_color &color);
|
||||||
virtual void FillRegion(BRegion& region,
|
virtual void FillRegion(BRegion& region,
|
||||||
const rgb_color& color);
|
const rgb_color& color);
|
||||||
|
|
||||||
virtual void StrokeRect(BRect rect);
|
virtual void StrokeRect(BRect rect);
|
||||||
virtual void FillRect(BRect rect);
|
virtual void FillRect(BRect rect);
|
||||||
virtual void FillRect(BRect rect, const BGradient& gradient);
|
virtual void FillRect(BRect rect, const BGradient& gradient);
|
||||||
|
|
||||||
virtual void FillRegion(BRegion& region);
|
virtual void FillRegion(BRegion& region);
|
||||||
virtual void FillRegion(BRegion& region,
|
virtual void FillRegion(BRegion& region,
|
||||||
const BGradient& gradient);
|
const BGradient& gradient);
|
||||||
|
|
||||||
virtual void DrawRoundRect(BRect rect, float xRadius,
|
virtual void DrawRoundRect(BRect rect, float xRadius,
|
||||||
float yRadius, bool filled);
|
float yRadius, bool filled);
|
||||||
virtual void FillRoundRect(BRect rect, float xRadius,
|
virtual void FillRoundRect(BRect rect, float xRadius,
|
||||||
float yRadius, const BGradient& gradient);
|
float yRadius, const BGradient& gradient);
|
||||||
|
|
||||||
virtual void DrawShape(const BRect& bounds,
|
virtual void DrawShape(const BRect& bounds,
|
||||||
int32 opCount, const uint32* opList,
|
int32 opCount, const uint32* opList,
|
||||||
int32 pointCount, const BPoint* pointList,
|
int32 pointCount, const BPoint* pointList,
|
||||||
bool filled,
|
bool filled,
|
||||||
const BPoint& viewToScreenOffset,
|
const BPoint& viewToScreenOffset,
|
||||||
float viewScale);
|
float viewScale);
|
||||||
virtual void FillShape(const BRect& bounds,
|
virtual void FillShape(const BRect& bounds,
|
||||||
int32 opCount, const uint32* opList,
|
int32 opCount, const uint32* opList,
|
||||||
int32 pointCount, const BPoint* pointList,
|
int32 pointCount, const BPoint* pointList,
|
||||||
const BGradient& gradient,
|
const BGradient& gradient,
|
||||||
const BPoint& viewToScreenOffset,
|
const BPoint& viewToScreenOffset,
|
||||||
float viewScale);
|
float viewScale);
|
||||||
|
|
||||||
virtual void DrawTriangle(BPoint* points,
|
virtual void DrawTriangle(BPoint* points,
|
||||||
const BRect& bounds, bool filled);
|
const BRect& bounds, bool filled);
|
||||||
virtual void FillTriangle(BPoint* points,
|
virtual void FillTriangle(BPoint* points,
|
||||||
const BRect& bounds,
|
const BRect& bounds,
|
||||||
const BGradient& gradient);
|
const BGradient& gradient);
|
||||||
|
|
||||||
// these versions are used by the Decorator
|
// these versions are used by the Decorator
|
||||||
virtual void StrokeLine(const BPoint& start,
|
virtual void StrokeLine(const BPoint& start,
|
||||||
const BPoint& end, const rgb_color& color);
|
const BPoint& end, const rgb_color& color);
|
||||||
virtual void StrokeLine(const BPoint& start,
|
virtual void StrokeLine(const BPoint& start,
|
||||||
const BPoint& end);
|
const BPoint& end);
|
||||||
virtual void StrokeLineArray(int32 numlines,
|
virtual void StrokeLineArray(int32 numlines,
|
||||||
const ViewLineArrayInfo* data);
|
const ViewLineArrayInfo* data);
|
||||||
|
|
||||||
// returns the pen position behind the (virtually) drawn string
|
// returns the pen position behind the (virtually) drawn string
|
||||||
virtual BPoint DrawString(const char* string, int32 length,
|
virtual BPoint DrawString(const char* string, int32 length,
|
||||||
const BPoint& point,
|
const BPoint& point,
|
||||||
escapement_delta* delta = NULL);
|
escapement_delta* delta = NULL);
|
||||||
virtual BPoint DrawString(const char* string, int32 length,
|
virtual BPoint DrawString(const char* string, int32 length,
|
||||||
const BPoint* offsets);
|
const BPoint* offsets);
|
||||||
|
|
||||||
virtual float StringWidth(const char* string, int32 length,
|
virtual float StringWidth(const char* string, int32 length,
|
||||||
escapement_delta* delta = NULL);
|
escapement_delta* delta = NULL);
|
||||||
|
|
||||||
// software rendering backend invoked by CopyRegion() for the sorted
|
// software rendering backend invoked by CopyRegion() for the sorted
|
||||||
// individual rects
|
// individual rects
|
||||||
virtual BRect CopyRect(BRect rect, int32 xOffset,
|
virtual BRect CopyRect(BRect rect, int32 xOffset,
|
||||||
int32 yOffset) const;
|
int32 yOffset) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _AddCallback();
|
status_t _AddCallback();
|
||||||
|
|
||||||
static bool _DrawingEngineResult(void* cookie,
|
static bool _DrawingEngineResult(void* cookie,
|
||||||
RemoteMessage& message);
|
RemoteMessage& message);
|
||||||
|
|
||||||
BRect _BuildBounds(BPoint* points, int32 pointCount);
|
BRect _BuildBounds(BPoint* points, int32 pointCount);
|
||||||
|
|
||||||
RemoteHWInterface* fHWInterface;
|
RemoteHWInterface* fHWInterface;
|
||||||
uint32 fToken;
|
uint32 fToken;
|
||||||
|
|
||||||
DrawState fState;
|
DrawState fState;
|
||||||
BRegion fClippingRegion;
|
BRegion fClippingRegion;
|
||||||
float fExtendWidth;
|
float fExtendWidth;
|
||||||
|
|
||||||
bool fCallbackAdded;
|
bool fCallbackAdded;
|
||||||
sem_id fResultNotify;
|
sem_id fResultNotify;
|
||||||
BPoint fDrawStringResult;
|
BPoint fDrawStringResult;
|
||||||
float fStringWidthResult;
|
float fStringWidthResult;
|
||||||
BBitmap* fReadBitmapResult;
|
BBitmap* fReadBitmapResult;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // REMOTE_DRAWING_ENGINE_H
|
#endif // REMOTE_DRAWING_ENGINE_H
|
||||||
|
|||||||
Reference in New Issue
Block a user