added support for picture clipping and state stack

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4800 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2003-09-25 12:12:58 +00:00
parent 88ad98dca8
commit 27e018e33c
+27 -2
View File
@@ -3,15 +3,17 @@
#include <Point.h> #include <Point.h>
#include <Font.h> #include <Font.h>
#include <Region.h>
#include <RGBColor.h> #include <RGBColor.h>
#include <FontServer.h> #include <FontServer.h>
#include <ServerFont.h> #include <ServerFont.h>
#include <PatternHandler.h> #include <PatternHandler.h>
#include "GraphicsDefs.h" #include <GraphicsDefs.h>
#include "InterfaceDefs.h" #include <InterfaceDefs.h>
class ServerBitmap; class ServerBitmap;
class ServerFont; class ServerFont;
class ServerPicture;
class LayerData class LayerData
{ {
@@ -47,9 +49,16 @@ public:
edelta.space = 0; edelta.space = 0;
edelta.nonspace = 0; edelta.nonspace = 0;
prevState = NULL;
clippPicture = NULL;
clippInverse = false;
} }
~LayerData(void) ~LayerData(void)
{ {
if (clippReg)
delete clippReg;
if (image){ if (image){
/* NOTE: I don't know yet how bitmap allocation/deallocation /* NOTE: I don't know yet how bitmap allocation/deallocation
is managed by server. I tend to think it's a reference is managed by server. I tend to think it's a reference
@@ -59,6 +68,16 @@ public:
TODO: tell 'image' we're finished with it! :-) TODO: tell 'image' we're finished with it! :-)
*/ */
} }
if (clippPicture){
/* same as for 'image'
TODO: tell 'clippPicture' we're finished with it
*/
}
if (prevState){
delete prevState;
prevState = NULL;
}
} }
// BView related // BView related
@@ -91,6 +110,12 @@ public:
//ServerBitmap *overlay; //ServerBitmap *overlay;
escapement_delta edelta; escapement_delta edelta;
// used for the state stack
LayerData *prevState;
ServerPicture *clippPicture;
bool clippInverse;
}; };
#endif #endif