added new memebers

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4571 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2003-09-08 21:03:25 +00:00
parent 6f274814d1
commit e2dd24fc3c
+76 -30
View File
@@ -4,51 +4,97 @@
#include <Point.h> #include <Point.h>
#include <Font.h> #include <Font.h>
#include "RGBColor.h" #include "RGBColor.h"
//#include "FontServer.h" #include "FontServer.h"
#include "ServerFont.h" #include "ServerFont.h"
#include "PatternHandler.h"
#include "GraphicsDefs.h"
#include "InterfaceDefs.h"
class ServerBitmap; class ServerBitmap;
class ServerFont;
class LayerData class LayerData
{ {
public: public:
LayerData(void) LayerData(void)
{ {
pensize=1.0;
penlocation.Set(0,0); penlocation.Set(0,0);
draw_mode=B_OP_COPY; pensize = 1.0;
blending_mode=B_ALPHA_OVERLAY; highcolor.SetColor(0, 0, 0, 255);
alpha_mode=B_CONSTANT_ALPHA; lowcolor.SetColor(255, 255, 255, 255);
background=NULL; viewcolor.SetColor(255, 255, 255, 255);
overlay=NULL; patt = pat_solidhigh;
highcolor.SetColor(0,0,0,255); draw_mode = B_OP_COPY;
lowcolor.SetColor(255,255,255,255); coordOrigin.Set(0.0, 0.0);
viewcolor.SetColor(255,255,255,255);
// font=fontserver->GetSystemPlain(); lineCap = B_BUTT_CAP;
font=NULL; lineJoin = B_BEVEL_JOIN;
scale=1.0; miterLimit = B_DEFAULT_MITER_LIMIT;
edelta.space=0;
edelta.nonspace=0; alphaSrcMode = B_PIXEL_ALPHA;
alphaFncMode = B_ALPHA_OVERLAY;
scale = 1.0;
fontAliasing = true;
font = fontserver->GetSystemPlain();
//font = NULL;
clippReg = NULL;
// NOTE: read below!
//background = NULL;
//overlay = NULL;
image = NULL;
isOverlay = false;
edelta.space = 0;
edelta.nonspace = 0;
} }
~LayerData(void) ~LayerData(void)
{ {
if(font) if(font) {
{ delete font;
delete font; font = NULL;
font=NULL; }
if (image){
/* NOTE: I don't know yet how bitmap allocation/deallocation
is managed by server. I tend to think it's a reference
count type, so a 'delete' it's NOT good here.
Maybe a image.Release()?
TODO: tell 'image' we're finished with it! :-)
*/
} }
} }
float pensize; // BView related
BPoint penlocation; BPoint penlocation;
drawing_mode draw_mode; float pensize;
source_alpha alpha_mode; RGBColor highcolor,
alpha_function blending_mode; lowcolor,
ServerBitmap *background; viewcolor;
ServerBitmap *overlay; Pattern patt;
RGBColor highcolor, lowcolor, viewcolor; drawing_mode draw_mode;
ServerFont *font; BPoint coordOrigin;
float scale;
escapement_delta edelta; cap_mode lineCap;
join_mode lineJoin;
float miterLimit;
source_alpha alphaSrcMode;
alpha_function alphaFncMode;
float scale;
bool fontAliasing;
ServerFont *font;
BRegion *clippReg;
// server related
// NOTE: only one image is needed. It's a bitmap OR an overlay!
ServerBitmap *image;
bool isOverlay;
//ServerBitmap *background;
//ServerBitmap *overlay;
escapement_delta edelta;
}; };
#endif #endif