Files
haiku-beta6/src/servers/app/ServerPicture.h
T
Stefano Ceccherini caae1184ab When creating a picture with data, the app_server was writing beyond the
allocated memory, without telling anyone. That was causing bad things to 
happen. Flattening and unflattening BPictures now works, and 
consequently, printing works too. Bug #1014 is fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-01 14:47:10 +00:00

43 lines
834 B
C++

#ifndef __SERVER_PICTURE_H
#define __SERVER_PICTURE_H
#include <DataIO.h>
#include <PictureDataWriter.h>
class ServerApp;
class ViewLayer;
class BPrivate::LinkReceiver;
class ServerPicture : public PictureDataWriter {
public:
int32 Token() { return fToken; }
void EnterStateChange();
void ExitStateChange();
void EnterFontChange();
void ExitFontChange();
void SyncState(ViewLayer *view);
void Play(ViewLayer *view);
const void *Data() const { return fData.Buffer(); }
int32 DataLength() const { return fData.BufferLength(); }
status_t ImportData(BPrivate::LinkReceiver &link);
private:
friend class ServerApp;
ServerPicture();
ServerPicture(const ServerPicture &);
~ServerPicture();
int32 fToken;
BMallocIO fData;
// DrawState *fState;
};
#endif // __SERVER_PICTURE_H