Sha256: a1bd7f55a22ac043b026c0a28cfb8412ef66b72efcddc1975ba8e6959babd408

Contents?: true

Size: 1.2 KB

Versions: 22

Compression:

Stored size: 1.2 KB

Contents

#pragma once

#include <Gosu/ImageData.hpp>
#include <memory>

namespace Gosu
{
    class EmptyImageData : public ImageData
    {
    public:
        int width() const override
        {
            return 0;
        }
        
        int height() const override
        {
            return 0;
        }
        
        void draw(double, double, Color,
                  double, double, Color,
                  double, double, Color,
                  double, double, Color,
                  ZPos, AlphaMode) const override
        {
        }
        
        GLTexInfo* gl_tex_info() const override
        {
            return nullptr;
        }
        
        Bitmap to_bitmap() const override
        {
            return Bitmap();
        }
        
        virtual std::unique_ptr<ImageData> subimage(int, int, int, int) const override
        {
            return nullptr;
        }
        
        virtual void insert(const Bitmap&, int x, int y) override
        {
        }
        
        static const std::shared_ptr<EmptyImageData>& instance_ptr()
        {
            static std::shared_ptr<EmptyImageData> instance = std::make_shared<EmptyImageData>();
            return instance;
        }
    };
}

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
gosu-1.1.1.1 src/EmptyImageData.hpp
gosu-1.1.0 src/EmptyImageData.hpp
gosu-1.1.0.pre2 src/EmptyImageData.hpp
gosu-1.1.0.pre1 src/EmptyImageData.hpp
gosu-1.0.0 src/EmptyImageData.hpp
gosu-1.0.0.pre2 src/EmptyImageData.hpp
gosu-1.0.0.pre1 src/EmptyImageData.hpp
gosu-0.15.2 src/EmptyImageData.hpp
gosu-0.15.1 src/EmptyImageData.hpp
gosu-0.15.0 src/EmptyImageData.hpp
gosu-0.14.6.pre1 src/EmptyImageData.hpp
gosu-0.14.5 src/EmptyImageData.hpp
gosu-0.14.4 src/EmptyImageData.hpp
gosu-0.14.4.pre2 src/EmptyImageData.hpp
gosu-0.14.3.pre1 src/EmptyImageData.hpp
gosu-0.14.3 src/EmptyImageData.hpp
gosu-0.14.0 src/EmptyImageData.hpp
gosu-0.14.0.pre2 src/EmptyImageData.hpp
gosu-0.13.3 src/EmptyImageData.hpp
gosu-0.13.2 src/EmptyImageData.hpp