Sha256: 984641c7117e0fb4302bc573138b0a802e3b761a31d11efc0be3701bcb6511ec

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

//! \file ImageData.hpp
//! Interface of the ImageData class.

#ifndef GOSU_IMAGEDATA_HPP
#define GOSU_IMAGEDATA_HPP

#include <Gosu/Color.hpp>
#include <Gosu/GraphicsBase.hpp>
#include <boost/optional.hpp>
#include <boost/utility.hpp>

namespace Gosu
{
    struct GLTexInfo
    {
        int texName;
        double left, right, top, bottom;
    };

    //! The ImageData class is an abstract base class for drawable images.
    //! Instances of classes derived by ImageData are usually returned by
    //! Graphics::createImage and usually only used to implement drawing
    //! primitives like Image, which then provide a more specialized and
    //! intuitive drawing interface.
    class ImageData : boost::noncopyable
    {
    public:
        virtual ~ImageData()
        {
        }

        virtual unsigned width() const = 0;
        virtual unsigned height() const = 0;

        virtual void draw(double x1, double y1, Color c1,
            double x2, double y2, Color c2,
            double x3, double y3, Color c3,
            double x4, double y4, Color c4,
            ZPos z, AlphaMode mode) const = 0;
            
        virtual boost::optional<GLTexInfo> glTexInfo() const = 0;
    };
}

#endif

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gosu-0.7.10.1 Gosu/ImageData.hpp
gosu-0.7.10.2 Gosu/ImageData.hpp
gosu-0.7.10.3 Gosu/ImageData.hpp
gosu-0.7.11 Gosu/ImageData.hpp
gosu-0.7.12 Gosu/ImageData.hpp
gosu-0.7.13 Gosu/ImageData.hpp