Optibits
Loading...
Searching...
No Matches
include
Optibits
Drawable.hpp
1
#pragma once
2
3
#include <Optibits/Fwd.hpp>
4
#include <Optibits/Color.hpp>
5
#include <Optibits/GraphicsBase.hpp>
6
#include <Optibits/Utility.hpp>
7
// STD
8
#include <cstdint>
9
#include <memory>
10
11
namespace
Optibits
12
{
13
14
const
unsigned
MAX_TEXTURE_SIZE = 1024;
15
16
struct
GLTexInfo
17
{
18
std::uint32_t texName;
19
double
left, right, top, bottom;
20
};
21
22
class
Drawable
:
private
Noncopyable
23
{
24
public
:
25
Drawable
() =
default
;
26
virtual
~Drawable
() =
default
;
27
28
virtual
int
width()
const
= 0;
29
virtual
int
height()
const
= 0;
30
31
virtual
int
draw(
double
x1,
double
y1,
Color
c1,
//
32
double
x2,
double
y2,
Color
c2,
//
33
double
x3,
double
y3,
Color
c3,
//
34
double
x4,
double
y4,
Color
c4,
//
35
ZPos z, BlendMode mode)
const
36
= 0;
37
38
virtual
const
GLTexInfo
* glTexInfo()
const
= 0;
39
40
virtual
Bitmap
toBitMap
const
= 0;
41
42
virtual
std::unique_ptr<Drawable> subimage(
const
Rect
& rect)
const
= 0;
43
44
virtual
void
insert(
const
Bitmap
& bitmap,
int
x,
int
y) = 0;
45
46
};
47
}
Optibits::Bitmap
Definition
Bitmap.hpp:13
Optibits::Drawable
Definition
Drawable.hpp:23
Optibits::Noncopyable
Definition
Utility.hpp:24
Optibits::Color
Definition
Color.hpp:11
Optibits::GLTexInfo
Definition
Drawable.hpp:17
Optibits::Rect
Definition
Utility.hpp:39
Generated by
1.12.0