Sha256: 2d8d4e4475afdddc5cf2ee688e5fdd6c95020cb9af18e209de4143628eb5c8ef

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

#pragma once

#include "GraphicsImpl.hpp"
#include <Gosu/Fwd.hpp>
#include <Gosu/ImageData.hpp>
#include <Gosu/Platform.hpp>
#include <memory>
#include <vector>

class Gosu::LargeImageData : public Gosu::ImageData
{
    int w, h;
    int tiles_x, tiles_y;
    std::vector<std::unique_ptr<ImageData>> tiles;
    
    LargeImageData() {}

public:
    LargeImageData(const Bitmap& source, int tile_width, int tile_height, unsigned image_flags);

    int width() const override  { return w; }
    int height() const override { return h; }

    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, BlendMode mode) const override;

    const GLTexInfo* gl_tex_info() const override { return nullptr; }
    
    std::unique_ptr<ImageData> subimage(int x, int y, int width, int height) const override;
    
    Bitmap to_bitmap() const override;
    
    void insert(const Bitmap& bitmap, int x, int y) override;
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gosu-1.3.0 src/LargeImageData.hpp
gosu-1.2.0 src/LargeImageData.hpp