add inner and outer texrects to sprite asset and atlas sprite

This commit is contained in:
BlackMATov
2020-02-22 09:01:58 +07:00
parent 2875944cbb
commit afaef0cef6
9 changed files with 156 additions and 47 deletions

View File

@@ -30,15 +30,18 @@ namespace e2d
sprite& assign(const sprite& other);
sprite& set_pivot(const v2f& pivot) noexcept;
sprite& set_texrect(const b2f& texrect) noexcept;
sprite& set_inner_texrect(const b2f& texrect) noexcept;
sprite& set_outer_texrect(const b2f& texrect) noexcept;
sprite& set_texture(const texture_asset::ptr& texture) noexcept;
const v2f& pivot() const noexcept;
const b2f& texrect() const noexcept;
const b2f& inner_texrect() const noexcept;
const b2f& outer_texrect() const noexcept;
const texture_asset::ptr& texture() const noexcept;
private:
v2f pivot_;
b2f texrect_;
b2f inner_texrect_;
b2f outer_texrect_;
texture_asset::ptr texture_;
};