#pragma once
#include <render/core/texture/texture.h>
#include "atlas.h"

namespace render{
namespace sprite{
class image: public virtual texture
{
public:
    vec2f scale;
    vec4f color;
    vec2u32 parts;

    image();
    image(const std::string &path, bool filter = 0);
    ~image();

    bool load(const std::string &path, bool filter = 0);

    icon getIcon() const noexcept;
    icon getIcon(vec2u32) const noexcept;

    vec4f getTexCoord(uint32_t) const noexcept;

    void draw(const vec2f &pos = vec2f()) const noexcept;
    void draw(const vec2f &pos, const vec2u32 &part, const vec2u32 &size = vec2u32(1)) const noexcept;
    void draw(const vec2f &pos, uint32_t part) const noexcept;
};
}}
