21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
+
+
+
+
+
+
+
+
+
+
+
+
+
|
#include <allegro5/allegro.h>
#import <ObjFW/ObjFW.h>
typedef struct ogk_color_t {
float red, green, blue, alpha;
} ogk_color_t;
typedef struct ogk_rotation_t {
of_point_t center;
float angle;
} ogk_rotation_t;
static OF_INLINE ogk_color_t
ogk_color(float red, float green, float blue, float alpha)
{
ogk_color_t color = { red, green, blue, alpha};
return color;
}
static OF_INLINE ogk_rotation_t
ogk_rotation(float x, float y, float angle)
{
ogk_rotation_t rotation = { of_point(x, y), angle };
return rotation;
}
extern ogk_color_t OGK_COLOR_BLACK;
@interface OGKBitmap: OFObject
{
ALLEGRO_BITMAP *bitmap;
}
|
63
64
65
66
67
68
69
70
71
72
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
+
+
+
+
+
+
+
+
+
+
+
+
|
tint: (ogk_color_t)tint;
- (void)drawAtPosition: (of_point_t)position
region: (of_rectangle_t)region
tint: (ogk_color_t)tint;
- (void)drawAtPosition: (of_point_t)position
region: (of_rectangle_t)region
scale: (of_dimension_t)scale
tint: (ogk_color_t)tint;
- (void)drawAtPosition: (of_point_t)position
rotation: (ogk_rotation_t)rotation;
- (void)drawAtPosition: (of_point_t)position
scale: (of_dimension_t)scale
rotation: (ogk_rotation_t)rotation;
- (void)drawAtPosition: (of_point_t)position
rotation: (ogk_rotation_t)rotation
tint: (ogk_color_t)tint;
- (void)drawAtPosition: (of_point_t)position
scale: (of_dimension_t)scale
rotation: (ogk_rotation_t)rotation
tint: (ogk_color_t)tint;
- (ALLEGRO_BITMAP*)OGK_allegroBitmap;
@end
|