Renderd7-nightly  v0.7.0
RenderD7::Image Class Reference

Image Class. More...

#include <renderd7.hpp>

Public Member Functions

void LoadPng (const std::string path)
 
void LoadPFromBuffer (const std::vector< u8 > &buffer)
 
bool Draw (float x, float y, float scaleX=1.0f, float scaleY=1.0f)
 
C2D_Image Get ()
 Get The Image. More...
 

Public Attributes

C2D_Image img
 @img this is the C2D_Image
 
bool loadet = false
 @loadet whether the image is loadet or not
 

Detailed Description

Image Class.

Member Function Documentation

◆ LoadPng()

void RenderD7::Image::LoadPng ( const std::string  path)

Load Image from Png path: path to png file

◆ LoadPFromBuffer()

void RenderD7::Image::LoadPFromBuffer ( const std::vector< u8 > &  buffer)

Load the Image from buffer buffer: the frame buffer

◆ Draw()

bool RenderD7::Image::Draw ( float  x,
float  y,
float  scaleX = 1.0f,
float  scaleY = 1.0f 
)

Draw the Image directly

Parameters
xThe x position
ythe y position
scaleXx scale from 0.0 to 1.0
scaleYy scale from 0.0 to 1.0

◆ Get()

C2D_Image RenderD7::Image::Get ( )
inline

Get The Image.

Returns
C2D_Image