Generated by Doxygen 1.8.14
Neographics
path.h
1 #pragma once
2 #include <pebble.h>
3 #include "../macros.h"
4 #include "../context.h"
5 #include "../types.h"
6 
7 #include "../primitives/line.h"
8 
17 typedef struct {
18  uint32_t num_points;
19  n_GPoint * points;
20 } n_GPathInfo;
21 
26 typedef struct {
27  uint32_t num_points;
28  n_GPoint * points;
29  int32_t angle;
30  n_GPoint offset;
31  bool open;
32 } n_GPath;
33 
37 n_GPath * n_gpath_create(n_GPathInfo * path_info);
41 void n_gpath_destroy(n_GPath * path);
42 
46 void n_graphics_draw_path(n_GContext * ctx, uint32_t num_points, n_GPoint * points, bool open);
50 void n_graphics_fill_path(n_GContext * ctx, uint32_t num_points, n_GPoint * points);
51 
55 void n_graphics_draw_ppath(n_GContext * ctx, uint32_t num_points, n_GPoint * points, bool open);
59 void n_graphics_fill_ppath(n_GContext * ctx, uint32_t num_points, n_GPoint * points);
60 
64 void n_gpath_draw(n_GContext * ctx, n_GPath * path);
68 void n_gpath_fill(n_GContext * ctx, n_GPath * path);
69 
73 void n_gpath_rotate_to(n_GPath * path, int32_t angle);
77 void n_gpath_move_to(n_GPath * path, n_GPoint offset);
78 
82 void n_prv_transform_points(uint32_t num_points, n_GPoint * points_in, n_GPoint * points_out,
83  int16_t angle, n_GPoint offset);
84 
void n_gpath_move_to(n_GPath *path, n_GPoint offset)
Definition: path.c:248
void n_graphics_fill_ppath(n_GContext *ctx, uint32_t num_points, n_GPoint *points)
Definition: path.c:198
void n_graphics_fill_path(n_GContext *ctx, uint32_t num_points, n_GPoint *points)
Definition: path.c:194
void n_graphics_draw_path(n_GContext *ctx, uint32_t num_points, n_GPoint *points, bool open)
Definition: path.c:41
void n_graphics_draw_ppath(n_GContext *ctx, uint32_t num_points, n_GPoint *points, bool open)
Definition: path.c:48
Definition: path.h:17
Definition: context.h:28
Definition: path.h:26
void n_prv_transform_points(uint32_t num_points, n_GPoint *points_in, n_GPoint *points_out, int16_t angle, n_GPoint offset)
Definition: path.c:204
n_GPath * n_gpath_create(n_GPathInfo *path_info)
Definition: path.c:3
void n_gpath_draw(n_GContext *ctx, n_GPath *path)
Definition: path.c:221
Definition: point.h:24
void n_gpath_rotate_to(n_GPath *path, int32_t angle)
Definition: path.c:244
void n_gpath_fill(n_GContext *ctx, n_GPath *path)
Definition: path.c:231
void n_gpath_destroy(n_GPath *path)
Definition: path.c:13