2012-08-25 13:19:58 +02:00
|
|
|
/*
|
|
|
|
* =====================================================================
|
|
|
|
* Version: 1.0
|
|
|
|
* Created: 25.08.2012 10:55:29
|
|
|
|
* Author: Miroslav Bendík
|
|
|
|
* Company: LinuxOS.sk
|
|
|
|
* =====================================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PIXELATTRIBUTES_H_ADZ35GYF
|
|
|
|
#define PIXELATTRIBUTES_H_ADZ35GYF
|
|
|
|
|
2012-08-25 13:27:40 +02:00
|
|
|
#include <limits>
|
2012-08-25 13:19:58 +02:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
struct PixelAttribute {
|
2012-08-25 13:27:40 +02:00
|
|
|
PixelAttribute(): height(std::numeric_limits<int>::min()) {};
|
2012-08-25 13:19:58 +02:00
|
|
|
int height;
|
2012-08-25 13:27:40 +02:00
|
|
|
inline bool valid_height() {
|
|
|
|
return height != std::numeric_limits<int>::min();
|
|
|
|
}
|
2012-08-25 13:19:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class PixelAttributes
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PixelAttributes();
|
|
|
|
void setWidth(int width);
|
|
|
|
void scroll();
|
|
|
|
inline PixelAttribute &attribute(int z, int x) { return m_blockPixelAttributes[z + 1][x + 1]; };
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector <std::vector <PixelAttribute> > m_blockPixelAttributes;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* end of include guard: PIXELATTRIBUTES_H_ADZ35GYF */
|
|
|
|
|