haiku/src/servers/app/PicturePlayer.h
Stephan Aßmus 6ed894182f renamed DisplayDriverPainter.* to DrawingEngine.*
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-04 15:54:16 +00:00

99 lines
2.8 KiB
C++

//------------------------------------------------------------------------------
// Copyright (c) 2001-2002, Haiku, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: PicturePlayer.cpp
// Author: Marc Flerackers (mflerackers@androme.be)
// DarkWyrm <bpmagic@columbus.rr.com>
// Description: Server class to interpret and play BPicture data. Based on
// Marc Flerackers' TPicture class
//------------------------------------------------------------------------------
#ifndef _PICTUREPLAYER_H
#define _PICTUREPLAYER_H
#include <GraphicsDefs.h>
#include <Point.h>
#include <Rect.h>
#include <DataIO.h>
#include "DrawState.h"
#include "PatternHandler.h" // for pattern_union
class DrawingEngine;
class PicturePlayer
{
public:
PicturePlayer(DrawingEngine *driver,void *data, int32 size);
virtual ~PicturePlayer();
int16 GetOp();
bool GetBool();
int16 GetInt8();
int16 GetInt16();
int32 GetInt32();
int64 GetInt64();
float GetFloat();
BPoint GetCoord();
BRect GetRect();
rgb_color GetColor();
//void GetString(char *);
void *GetData(int32);
void GetData(void *data, int32 size);
void AddInt8(int8);
void AddInt16(int16);
void AddInt32(int32);
void AddInt64(int64);
void AddFloat(float);
void AddCoord(BPoint);
void AddRect(BRect);
void AddColor(rgb_color);
void AddString(char *);
void AddData(void *data, int32 size);
void BeginOp(int32);
void EndOp();
void EnterStateChange();
void ExitStateChange();
void EnterFontChange();
void ExitFontChange();
void SetClippingRegion(BRect *rects, int32 numrects);
status_t Play(int32 tableEntries,void *userData, DrawState *d);
status_t Rewind();
private:
BMemoryIO fData;
int32 fSize;
DrawingEngine *fdriver;
DrawState fldata;
BPoint forigin;
Pattern stipplepat;
BRegion *clipreg;
};
#endif