Index: /trunk/nv/gl/image.hh
===================================================================
--- /trunk/nv/gl/image.hh	(revision 25)
+++ /trunk/nv/gl/image.hh	(revision 26)
@@ -13,4 +13,7 @@
 namespace nv
 {
+	/**
+	 * Defines the starting position of some region and its size.
+	 */
 	struct region
 	{
@@ -22,19 +25,76 @@
 	};
 
+	/**
+	 * Holder for images.
+	 *
+	 * By an image we understand a group of pixels, limited to X and Y
+	 * dimensions, of a certain depth (by depth we mean how rich
+	 * the colours are.
+	 */
 	class image
 	{
 	public:
+		/**
+		 * Constructor
+		 *
+		 * @arg[in] size : Dimensions of the image as a vector.
+		 * @arg[in] depth :  Depth of the image.
+		 */
 		image( glm::ivec2 size, size_t depth );
+		/**
+		 * Full constructor.
+		 *
+		 * Allows creation of an image with specified data. It is
+		 * to reverse the image (from left to right).
+		 *
+		 * @arg[in] size : Dimensions of the image as a vector.
+		 * @arg[in] depth : Depth of the image.
+		 * @arg[in] data : Data of the image.
+		 * @arg[in] reversed : Determines if the image should be
+		 * 	reversed or not.
+		 */
 		image( glm::ivec2 size, size_t depth, const uint8 * data, bool reversed = false );
-		void clear();
+		/**
+		 * Fills the image with a given value.
+		 *
+		 * @arg[in] value : Value to fill.
+		 */
 		void fill( uint8 value );
+		/**
+		 * Just like fill, but a region can be specified.
+		 *
+		 * @arg[in] r : Region to be filled.
+		 * @arg[in] data : Data to fill the region
+		 * @arg[in] stride : 
+		 */
 		void set_region( region r, const uint8 * data, size_t stride = 0 );
-		~image();
+		/**
+		 * Default destructor. Deallocates data.
+		 */
+		virtual ~image();
+		/**
+		 * Getter for data.
+		 *
+		 * @return The data.
+		 */
 		const uint8 * get_data() const { return m_data; }
+		/**
+		 * Getter for size.
+		 *
+		 * @return Returns the size of the image as a vector.
+		 */
 		const glm::ivec2 get_size() const { return m_size; }
+		/**
+		 * Getter for depth.
+		 *
+		 * @return Returns depth of the image.
+		 */
 		const size_t get_depth() const { return m_depth; }
 	protected:
+		/** Defines the size of the image as a vector. */
 		glm::ivec2 m_size;
+		/** Deefines the depth of the image. */
 		size_t     m_depth;
+		/** Holder for data. */
 		uint8*     m_data;
 	};
@@ -43,2 +103,3 @@
 
 #endif // NV_IMAGE_HH
+
Index: /trunk/src/gl/image.cc
===================================================================
--- /trunk/src/gl/image.cc	(revision 25)
+++ /trunk/src/gl/image.cc	(revision 26)
@@ -22,5 +22,5 @@
 	if ( reversed )
 	{
-		for( size_t i = 0; i < size.y; ++i )
+		for( int i = 0; i < size.y; ++i )
 		{
 			memcpy( m_data + size.x * ( size.y - i - 1) * m_depth, data + i * size.x * m_depth, m_size.x * m_depth );
@@ -43,9 +43,9 @@
 	if ( stride == 0 ) stride = r.size.x;
 
-    for( size_t i = 0; i < r.size.y; ++i )
-    {
-        memcpy( m_data+((r.pos.y+i)*m_size.x + r.pos.x ) * m_depth, 
-                data + (i*stride), r.size.x * m_depth );
-    }
+	for( int i = 0; i < r.size.y; ++i )
+ 	{
+		memcpy( m_data+((r.pos.y+i)*m_size.x + r.pos.x ) * m_depth, 
+			data + (i*stride), r.size.x * m_depth );
+	}
 }
 
