+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
#ifndef MSP_GLTK_GRAPHIC_H_
#define MSP_GLTK_GRAPHIC_H_
class Resources;
+/**
+Stores a single graphical element. Graphics are used as parts of widgets.
+*/
class Graphic
{
public:
void shadow();
};
+private:
+ Sides border;
+ Sides shadow;
+ const GL::Texture2D *texture;
+ Geometry slice;
+ bool repeat;
+
+public:
Graphic();
const Sides &get_border() const { return border; }
const Sides &get_shadow() const { return shadow; }
unsigned get_height() const { return slice.h; }
void render(unsigned, unsigned) const;
private:
- Sides border;
- Sides shadow;
- const GL::Texture2D *texture;
- Geometry slice;
- bool repeat;
-
void create_coords(float, float, float, float, float, std::vector<float> &) const;
void create_texcoords(float, float, float, float, float, std::vector<float> &) const;
};