* Copyright 2006, Haiku. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Stephan Aßmus <superstippi@gmx.de>
*/
#ifndef LAYER_H
#define LAYER_H
#include <Rect.h>
#include <String.h>
enum {
FLAG_INVISIBLE = 0x01,
};
enum {
MODE_NORMAL = 0,
MODE_MULTIPLY = 1,
MODE_INVERSE_MULTIPLY = 2,
MODE_LUMINANCE = 3,
MODE_MULTIPLY_ALPHA = 4,
MODE_MULTIPLY_INVERSE_ALPHA = 5,
MODE_REPLACE_RED = 6,
MODE_REPLACE_GREEN = 7,
MODE_REPLACE_BLUE = 8,
MODE_DARKEN = 9,
MODE_LIGHTEN = 10,
MODE_HARD_LIGHT = 11,
MODE_SOFT_LIGHT = 12,
};
class BBitmap;
class BMessage;
class Layer {
public:
Layer();
~Layer();
inline BRect ActiveBounds() const
{ return fBounds; }
status_t Compose(const BBitmap* into,
BRect area);
status_t Unarchive(const BMessage* archive);
protected:
BBitmap* fBitmap;
BRect fBounds;
float fAlpha;
uint32 fMode;
uint32 fFlags;
};
#endif