egami: Ewol IMAGE interface abstraction 0.5.0
Main Page
Related Pages
Namespaces
Classes
Files
Link-libs
lutin
ewol
echrono
etk
ejson
exml
esvg
egami
gale
ege
elog
ememory
enet
eproperty
esignal
etranslate
zeus
audio-ess
audio
audio-drain
audio-orchestra
audio-river
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
framework
atria-soft
egami
egami
ImageMono.hpp
Go to the documentation of this file.
1
6
#pragma once
7
8
#include <
etk/types.hpp
>
9
#include <
etk/math/Vector2D.hpp
>
10
#include <
etk/Color.hpp
>
11
12
#include <vector>
13
14
namespace
egami
{
15
class
ImageMono
{
16
private
:
17
ivec2
m_size;
18
std::vector<uint8_t> m_data;
19
public
:
20
// constructor :
21
ImageMono
(
const
ivec2
& _size=
ivec2
(32,32));
22
// destructor
23
~
ImageMono
() { };
24
// EWOL internal API for Texture system :
25
public
:
26
void
* getTextureDataPointer() {
27
return
&m_data[0];
28
};
29
/*
30
enum colorType getType() {
31
return egami::colorType::unsignedInt8;
32
};
33
*/
34
// -----------------------------------------------
35
// -- basic tools :
36
// -----------------------------------------------
37
public
:
38
void
resize(
const
ivec2
& _size,
const
ivec2
& _startPos=
ivec2
(0,0));
39
void
resize(
const
ivec2
& _size,
const
uint8_t& _color);
40
41
const
ivec2
& getSize()
const
{
42
return
m_size;
43
};
44
int32_t getWidth()
const
{
45
return
m_size.
x
();
46
};
47
int32_t getHeight()
const
{
48
return
m_size.
y
();
49
};
50
void
clear(uint8_t _fill);
51
const
uint8_t&
get
(
const
ivec2
& _pos)
const
;
52
void
set
(
const
ivec2
& _pos,
const
uint8_t& _newColor);
53
};
54
}
55
etk::Vector2D::x
const T & x() const
Color.hpp
Vector2D.hpp
egami
Definition:
debug.hpp:10
types.hpp
egami::ImageMono
Definition:
ImageMono.hpp:15
etk::Vector2D::y
const T & y() const
etk::Vector2D< int32_t >
Generated on Mon Oct 24 2016 15:35:51 for egami: Ewol IMAGE interface abstraction by
1.8.12