2004-01-27 03:39:41 +03:00
|
|
|
//------------------------------------------------------------------------------
|
2004-09-21 02:46:37 +04:00
|
|
|
// Copyright (c) 2001-2002, Haiku, Inc.
|
2004-01-27 03:39:41 +03:00
|
|
|
//
|
|
|
|
// 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: LayerData.h
|
|
|
|
// Author: DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
// Adi Oanca <adioanca@mymail.ro>
|
|
|
|
// Description: Data classes for working with BView states and draw parameters
|
|
|
|
//
|
|
|
|
//------------------------------------------------------------------------------
|
2003-01-20 23:38:49 +03:00
|
|
|
#ifndef LAYERDATA_H_
|
|
|
|
#define LAYERDATA_H_
|
|
|
|
|
|
|
|
#include <Point.h>
|
|
|
|
#include <Font.h>
|
2003-09-25 16:12:58 +04:00
|
|
|
#include <Region.h>
|
2003-09-09 14:27:08 +04:00
|
|
|
#include <RGBColor.h>
|
|
|
|
#include <FontServer.h>
|
|
|
|
#include <ServerFont.h>
|
|
|
|
#include <PatternHandler.h>
|
2003-09-25 16:12:58 +04:00
|
|
|
#include <GraphicsDefs.h>
|
|
|
|
#include <InterfaceDefs.h>
|
2003-01-20 23:38:49 +03:00
|
|
|
|
|
|
|
class ServerBitmap;
|
2003-09-09 01:03:25 +04:00
|
|
|
class ServerFont;
|
2003-09-25 16:12:58 +04:00
|
|
|
class ServerPicture;
|
2004-01-27 03:39:41 +03:00
|
|
|
class Layer;
|
2003-01-20 23:38:49 +03:00
|
|
|
|
2004-01-27 03:39:41 +03:00
|
|
|
class DrawData
|
2003-01-20 23:38:49 +03:00
|
|
|
{
|
|
|
|
public:
|
2004-04-03 19:03:57 +04:00
|
|
|
DrawData(void);
|
|
|
|
DrawData(const DrawData &data);
|
|
|
|
virtual ~DrawData(void);
|
|
|
|
DrawData& operator=(const DrawData &from);
|
2004-09-21 02:46:37 +04:00
|
|
|
// TODO: uncomment and implement DrawData::PrintToStream when needed.
|
2004-04-03 19:03:57 +04:00
|
|
|
// virtual void PrintToStream() const;
|
2003-09-09 01:03:25 +04:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
BPoint penlocation;
|
2003-09-09 01:03:25 +04:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
RGBColor highcolor,
|
|
|
|
lowcolor;
|
|
|
|
|
|
|
|
float pensize;
|
|
|
|
Pattern patt;
|
|
|
|
drawing_mode draw_mode;
|
2003-09-09 01:03:25 +04:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
cap_mode lineCap;
|
|
|
|
join_mode lineJoin;
|
|
|
|
float miterLimit;
|
2003-09-09 01:03:25 +04:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
source_alpha alphaSrcMode;
|
|
|
|
alpha_function alphaFncMode;
|
|
|
|
float scale;
|
|
|
|
bool fontAliasing;
|
|
|
|
ServerFont font;
|
2004-01-27 03:39:41 +03:00
|
|
|
|
2004-05-20 05:28:17 +04:00
|
|
|
BRegion* clipReg;
|
2004-01-27 03:39:41 +03:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
escapement_delta edelta;
|
2004-01-27 03:39:41 +03:00
|
|
|
};
|
2003-09-09 01:03:25 +04:00
|
|
|
|
2004-01-27 03:39:41 +03:00
|
|
|
class LayerData : public DrawData
|
|
|
|
{
|
|
|
|
public:
|
2004-04-03 19:03:57 +04:00
|
|
|
LayerData(void);
|
|
|
|
LayerData(const Layer *layer);
|
|
|
|
LayerData(const LayerData &data);
|
|
|
|
virtual ~LayerData(void);
|
|
|
|
LayerData &operator=(const LayerData &from);
|
|
|
|
|
|
|
|
virtual void PrintToStream() const;
|
|
|
|
|
|
|
|
BPoint coordOrigin;
|
2004-01-27 03:39:41 +03:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
RGBColor viewcolor;
|
2004-01-27 03:39:41 +03:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
// We have both because we are not going to suffer from the limitation that R5
|
|
|
|
// places on us. We can have both. :)
|
|
|
|
ServerBitmap* background;
|
|
|
|
ServerBitmap* overlay;
|
2004-01-27 03:39:41 +03:00
|
|
|
|
2004-04-03 19:03:57 +04:00
|
|
|
// used for the state stack
|
|
|
|
LayerData* prevState;
|
2003-01-20 23:38:49 +03:00
|
|
|
};
|
2003-02-07 20:30:17 +03:00
|
|
|
#endif
|