1/*
2 * Copyright 2015 Julian Harnath <julian.harnath@rwth-aachen.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
4 */
5#ifndef LAYER_H
6#define LAYER_H
7
8
9#include "ServerPicture.h"
10
11#include "IntPoint.h"
12
13
14class AlphaMask;
15class Canvas;
16class UtilityBitmap;
17
18
19class Layer : public ServerPicture {
20public:
21								Layer(uint8 opacity);
22	virtual						~Layer();
23
24			void				PushLayer(Layer* layer);
25			Layer*				PopLayer();
26
27			UtilityBitmap*		RenderToBitmap(Canvas* canvas);
28
29			IntPoint			LeftTopOffset() const;
30			uint8				Opacity() const;
31
32private:
33			BRect				_DetermineBoundingBox(Canvas* canvas);
34			UtilityBitmap*		_AllocateBitmap(const BRect& bounds);
35
36private:
37			uint8				fOpacity;
38			IntPoint			fLeftTopOffset;
39};
40
41
42#endif // LAYER_H
43