Plutonium framework API  0.3
Simple UI framework for libnx and SDL2
elm_Image.hpp
Go to the documentation of this file.
1 
2 /*
3 
4  Plutonium library
5 
6  @file Image.hpp
7  @brief An Image is an Element showing a picture. (JPEG, PNG, TGA, BMP)
8  @author XorTroll
9 
10  @copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
11 
12 */
13 
14 #pragma once
16 
17 namespace pu::ui::elm
18 {
19  class Image : public Element
20  {
21  public:
22  Image(i32 X, i32 Y, String Image);
23  PU_SMART_CTOR(Image)
24  ~Image();
25 
26  i32 GetX();
27  void SetX(i32 X);
28  i32 GetY();
29  void SetY(i32 Y);
30  i32 GetWidth();
31  void SetWidth(i32 Width);
32  i32 GetHeight();
33  void SetHeight(i32 Height);
34  float GetRotation();
35  void SetRotation(float Angle);
36  String GetImage();
37  void SetImage(String Image);
38  bool IsImageValid();
39  void OnRender(render::Renderer::Ref &Drawer, i32 X, i32 Y);
40  void OnInput(u64 Down, u64 Up, u64 Held, Touch Pos);
41  private:
42  String img;
43  sdl2::Texture ntex;
45  i32 x;
46  i32 y;
47  };
48 }
Definition: elm_Button.hpp:19
Definition: pu_String.hpp:21
void SetX(i32 X)
Definition: ui_Types.hpp:38
void SetHeight(i32 Height)
void SetRotation(float Angle)
SDL_Texture * Texture
Definition: sdl2_Types.hpp:11
s32 i32
Definition: pu_Macros.hpp:17
#define PU_SMART_CTOR(type)
Definition: pu_Macros.hpp:8
void OnInput(u64 Down, u64 Up, u64 Held, Touch Pos)
Definition: elm_Image.hpp:19
Image(i32 X, i32 Y, String Image)
void SetY(i32 Y)
void OnRender(render::Renderer::Ref &Drawer, i32 X, i32 Y)
void SetImage(String Image)
Definition: elm_Element.hpp:34
Definition: render_Renderer.hpp:82
void SetWidth(i32 Width)