Euphoria
scalablesprite.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include "base/rect.h"
6 
7 
8 namespace eu::io
9 {
10  struct FileSystem;
11  struct FilePath;
12 }
13 
14 namespace eu
15 {
16  struct Rgba;
17 }
18 
19 namespace eu::render
20 {
21  struct Buffer2d;
22  struct Texture2;
23  struct TextureId;
24  struct TextureCache;
25  struct SpriteRenderer;
26 
28  {
30  (
31  io::FileSystem* fs,
32  const io::FilePath& path,
33  TextureCache* cache
34  );
36 
37  ScalableSprite(const ScalableSprite& other) = delete;
38  void operator=(const ScalableSprite&) = delete;
39  ScalableSprite(ScalableSprite&& other) = delete;
40  void operator=(ScalableSprite&&) = delete;
41 
42  [[nodiscard]] size2f
43  get_minimum_size() const;
44 
45  void
46  render(SpriteRenderer* renderer, const Rectf& rect, const Rgba& tint) const;
47 
48  std::shared_ptr<Texture2> texture;
49 
50  std::vector<float> columns;
51  std::vector<float> rows;
52 
55  };
56 }
Definition: enum.h:8
Definition: assert.h:90
Definition: rect.h:27
Definition: rgb.h:143
ScalableSprite(io::FileSystem *fs, const io::FilePath &path, TextureCache *cache)
void operator=(const ScalableSprite &)=delete
std::vector< float > rows
ScalableSprite(ScalableSprite &&other)=delete
std::vector< float > columns
std::shared_ptr< Texture2 > texture
void render(SpriteRenderer *renderer, const Rectf &rect, const Rgba &tint) const
ScalableSprite(const ScalableSprite &other)=delete
void operator=(ScalableSprite &&)=delete