4 #include "../path/path.h" 5 #include "../primitives/circle.h" 33 #define __N_DRAW_COMMAND_MAXIMUM_SUPPORTED_VERSION 2 40 n_GDrawCommandTypeInvalid = 0,
41 n_GDrawCommandTypePath = 1,
42 n_GDrawCommandTypeCircle = 2,
43 n_GDrawCommandTypePrecisePath = 3,
44 n_GDrawCommandTypePreciseCircle = 4,
56 n_GDrawCommandBWColorClear = 0,
57 n_GDrawCommandBWColorBlack = 1,
58 n_GDrawCommandBWColorGray = 2,
59 n_GDrawCommandBWColorWhite = 3,
87 uint16_t circle_radius;
97 uint16_t num_commands;
137 typedef bool (n_GDrawCommandListIteratorCb)(
n_GDrawCommand * command, uint32_t index,
void * context);
void n_gdraw_command_set_point(n_GDrawCommand *command, uint16_t index, n_GPoint point)
Definition: draw_command.c:43
void n_gdraw_command_frame_draw(n_GContext *ctx, n_GDrawCommandSequence *sequence, n_GDrawCommandFrame *frame, n_GPoint offset)
Definition: draw_command.c:143
void n_gdraw_command_sequence_destroy(n_GDrawCommandSequence *sequence)
Definition: draw_command.c:282
n_GPoint n_gdraw_command_get_point(n_GDrawCommand *command, uint16_t index)
Definition: draw_command.c:40
bool n_gdraw_command_get_hidden(n_GDrawCommand *command)
Definition: draw_command.c:61
void n_gdraw_command_frame_set_duration(n_GDrawCommandFrame *frame, uint16_t duration)
Definition: draw_command.c:202
void n_gdraw_command_set_stroke_color(n_GDrawCommand *command, n_GColor stroke_color)
Definition: draw_command.c:22
n_GSize n_gdraw_command_image_get_bounds_size(n_GDrawCommandImage *image)
Definition: draw_command.c:242
bool n_gdraw_command_get_path_open(n_GDrawCommand *command)
Definition: draw_command.c:54
uint16_t n_gdraw_command_sequence_get_num_frames(n_GDrawCommandSequence *sequence)
Definition: draw_command.c:237
n_GDrawCommandSequence * n_gdraw_command_sequence_clone(n_GDrawCommandSequence *image)
Definition: draw_command.c:280
uint16_t n_gdraw_command_frame_get_duration(n_GDrawCommandFrame *frame)
Definition: draw_command.c:200
void n_gdraw_command_set_radius(n_GDrawCommand *command, uint16_t radius)
Definition: draw_command.c:50
Definition: draw_command.h:77
n_GColor n_gdraw_command_get_fill_color(n_GDrawCommand *command)
Definition: draw_command.c:33
Definition: draw_command.h:127
n_GDrawCommandBWColor
Definition: draw_command.h:55
void n_gdraw_command_set_hidden(n_GDrawCommand *command, bool hidden)
Definition: draw_command.c:64
void n_gdraw_command_set_path_open(n_GDrawCommand *command, bool path_open)
Definition: draw_command.c:57
void n_gdraw_command_set_fill_color(n_GDrawCommand *command, n_GColor fill_color)
Definition: draw_command.c:36
n_GDrawCommandImage * n_gdraw_command_image_clone(n_GDrawCommandImage *image)
Definition: draw_command.c:264
n_GDrawCommandFrame * n_gdraw_command_sequence_get_frame_by_index(n_GDrawCommandSequence *sequence, uint32_t index)
Definition: draw_command.c:221
uint8_t n_gdraw_command_get_stroke_width(n_GDrawCommand *command)
Definition: draw_command.c:26
void n_gdraw_command_sequence_set_bounds_size(n_GDrawCommandSequence *sequence, n_GSize size)
Definition: draw_command.c:249
Definition: draw_command.h:96
n_GDrawCommand * n_gdraw_command_list_get_command(n_GDrawCommandList *list, uint32_t index)
Definition: draw_command.c:178
void n_gdraw_command_image_destroy(n_GDrawCommandImage *image)
Definition: draw_command.c:266
void n_gdraw_command_image_draw(n_GContext *ctx, n_GDrawCommandImage *image, n_GPoint offset)
Definition: draw_command.c:139
uint16_t n_gdraw_command_get_radius(n_GDrawCommand *command)
Definition: draw_command.c:47
uint16_t n_gdraw_command_get_num_points(n_GDrawCommand *command)
Definition: draw_command.c:15
n_GDrawCommandSequence * n_gdraw_command_sequence_create_with_resource(uint32_t resource_id)
Definition: draw_command.c:270
n_GDrawCommandType
Definition: draw_command.h:39
Definition: draw_command.h:117
uint32_t n_gdraw_command_list_get_num_commands(n_GDrawCommandList *list)
Definition: draw_command.c:175
n_GSize n_gdraw_command_sequence_get_bounds_size(n_GDrawCommandSequence *sequence)
Definition: draw_command.c:247
n_GDrawCommandList * n_gdraw_command_frame_get_command_list(n_GDrawCommandFrame *frame)
Definition: draw_command.c:171
uint32_t n_gdraw_command_sequence_get_total_duration(n_GDrawCommandSequence *sequence)
Definition: draw_command.c:228
struct n_GDrawCommand __attribute((__packed__)) n_GDrawCommand
void n_gdraw_command_list_iterate(n_GDrawCommandList *list, n_GDrawCommandListIteratorCb cb, void *cb_context)
Definition: draw_command.c:188
void n_gdraw_command_image_set_bounds_size(n_GDrawCommandImage *image, n_GSize size)
Definition: draw_command.c:244
n_GColor n_gdraw_command_get_stroke_color(n_GDrawCommand *command)
Definition: draw_command.c:19
n_GDrawCommandImage * n_gdraw_command_image_create_with_resource(uint32_t resource_id)
Definition: draw_command.c:254
Definition: draw_command.h:105
void n_gdraw_command_list_draw(n_GContext *ctx, n_GDrawCommandList *list, n_GPoint offset)
Definition: draw_command.c:158
void n_gdraw_command_draw(n_GContext *ctx, n_GDrawCommand *command, n_GPoint offset)
Definition: draw_command.c:70
void n_gdraw_command_set_stroke_width(n_GDrawCommand *command, uint8_t stroke_width)
Definition: draw_command.c:29
void n_gdraw_command_sequence_set_play_count(n_GDrawCommandSequence *sequence, uint16_t play_count)
Definition: draw_command.c:225
uint32_t n_gdraw_command_sequence_get_play_count(n_GDrawCommandSequence *sequence)
Definition: draw_command.c:223
Definition: draw_command.h:67
n_GDrawCommandType n_gdraw_command_get_type(n_GDrawCommand *command)
Definition: draw_command.c:11
n_GDrawCommandList * n_gdraw_command_image_get_command_list(n_GDrawCommandImage *image)
Definition: draw_command.c:168
struct n_GDrawCommandFlags n_GDrawCommandFlags
n_GDrawCommandFrame * n_gdraw_command_sequence_get_frame_by_elapsed(n_GDrawCommandSequence *sequence, uint32_t ms)
Definition: draw_command.c:207