1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-09-18 01:09:54 +03:00
eda-tools/sch2fig/text.h
2016-07-23 00:48:59 -03:00

44 lines
994 B
C

/*
* text.h - FIG text object
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef TEXT_H
#define TEXT_H
/* use constants of FIG text sub_type */
enum text_align {
text_min = 0, // left or bottom
text_mid = 1, // center
text_max = 2, // right or top
};
struct text {
const char *s;
int size;
int x, y;
int rot;
enum text_align hor;
enum text_align vert;
};
void text_init(struct text *txt);
void text_free(struct text *txt);
void text_set(struct text *txt, const char *s);
void text_fig(struct text *txt, int color, unsigned layer);
void text_rel_x(struct text *txt, int x, int y);
void text_rel_y(struct text *txt, int x, int y);
#endif /* !TEXT_H */