summaryrefslogtreecommitdiff
path: root/gfx/text.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 14:07:45 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 14:19:21 -0300
commitbd9943d473ab96c5d37b0944ed33a1f6766d62e5 (patch)
tree59f27d8fa71f981928293bc8e55e7c0415d08db2 /gfx/text.h
parentc58e2ecd39de8f433c787a8feb558509e664ac88 (diff)
downloadeeshow-bd9943d473ab96c5d37b0944ed33a1f6766d62e5.tar.gz
eeshow-bd9943d473ab96c5d37b0944ed33a1f6766d62e5.tar.bz2
eeshow-bd9943d473ab96c5d37b0944ed33a1f6766d62e5.zip
remove global gfx state (pass context as argument)
Diffstat (limited to 'gfx/text.h')
-rw-r--r--gfx/text.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/gfx/text.h b/gfx/text.h
index e6327fd..0564cb0 100644
--- a/gfx/text.h
+++ b/gfx/text.h
@@ -14,6 +14,8 @@
#ifndef GFX_TEXT_H
#define GFX_TEXT_H
+struct gfx; /* don't recurse */
+
/* use constants of FIG text sub_type */
@@ -45,15 +47,20 @@ void text_rot(struct text *txt, int deg);
void text_flip_x(struct text *txt);
enum text_align text_flip(enum text_align align);
-void text_fig(const struct text *txt, int color, unsigned layer);
+void text_fig(const struct text *txt, struct gfx *gfx,
+ int color, unsigned layer);
-void text_rel(const struct text *txt, enum text_align xr, enum text_align yr,
+void text_rel(const struct text *txt, struct gfx *gfx,
+ enum text_align xr, enum text_align yr,
int dx, int dy, int *res_x, int *res_y);
-void text_shift(struct text *txt, enum text_align xr, enum text_align yr,
+void text_shift(struct text *txt, struct gfx *gfx,
+ enum text_align xr, enum text_align yr,
int dx, int dy);
-int text_rel_x(const struct text *txt, enum text_align xr, enum text_align yr,
+int text_rel_x(const struct text *txt, struct gfx *gfx,
+ enum text_align xr, enum text_align yr,
int dx, int dy);
-int text_rel_y(const struct text *txt, enum text_align xr, enum text_align yr,
+int text_rel_y(const struct text *txt, struct gfx *gfx,
+ enum text_align xr, enum text_align yr,
int dx, int dy);
#endif /* !GFX_TEXT_H */