Sha256: 60210541093acd54403046e5d4790d909f9e9fd3292937e85f5f4aaec724c915

Contents?: true

Size: 1.1 KB

Versions: 7

Compression:

Stored size: 1.1 KB

Contents

#pragma once

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

class Gosu::LargeImageData : public Gosu::ImageData
{
    int m_w, m_h;
    int m_tiles_x, m_tiles_y;
    std::vector<std::unique_ptr<ImageData>> m_tiles;

    LargeImageData() = default;

    const ImageData& tile(int x, int y) const;

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

    int width() const override { return m_w; }
    int height() const override { return m_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

7 entries across 7 versions & 1 rubygems

Version Path
gosu-1.4.6 src/LargeImageData.hpp
gosu-1.4.5 src/LargeImageData.hpp
gosu-1.4.5.pre1 src/LargeImageData.hpp
gosu-1.4.4 src/LargeImageData.hpp
gosu-1.4.3 src/LargeImageData.hpp
gosu-1.4.1 src/LargeImageData.hpp
gosu-1.4.0 src/LargeImageData.hpp