2016-07-22 06:04:42 +03:00
|
|
|
/*
|
|
|
|
* fig.h - Generate FIG output for Eeschema items
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2016-07-22 05:54:32 +03:00
|
|
|
#ifndef FIG_H
|
|
|
|
#define FIG_H
|
|
|
|
|
2016-07-23 06:48:59 +03:00
|
|
|
#include "text.h"
|
|
|
|
|
|
|
|
|
2016-07-22 05:54:32 +03:00
|
|
|
enum fig_shape {
|
|
|
|
fig_unspec, // UnSpc
|
|
|
|
fig_in, // Input
|
|
|
|
fig_out, // Output
|
|
|
|
fig_tri, // 3State
|
2016-07-24 07:03:23 +03:00
|
|
|
fig_bidir, // Bidirectional
|
2016-07-22 05:54:32 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* schematics */
|
|
|
|
|
2016-07-25 06:16:09 +03:00
|
|
|
void fig_label(int x, int y, const char *s, int dir, int dim,
|
|
|
|
enum fig_shape shape);
|
2016-07-22 05:54:32 +03:00
|
|
|
void fig_glabel(int x, int y, const char *s, int dir, int dim,
|
|
|
|
enum fig_shape shape);
|
|
|
|
|
|
|
|
void fig_junction(int x, int y);
|
2016-07-24 07:03:23 +03:00
|
|
|
void fig_noconn(int x, int y);
|
2016-07-22 05:54:32 +03:00
|
|
|
|
|
|
|
void fig_wire(int sx, int sy, int ex, int ey);
|
|
|
|
void fig_line(int sx, int sy, int ex, int ey);
|
|
|
|
|
2016-07-23 06:48:59 +03:00
|
|
|
/* general */
|
|
|
|
|
2016-07-25 04:57:52 +03:00
|
|
|
void fig_rect(int sx, int sy, int ex, int ey,
|
|
|
|
int color, int fill_color, unsigned layer);
|
2016-07-24 05:12:56 +03:00
|
|
|
void fig_poly(int points, int x[points], int y[points],
|
2016-07-25 04:57:52 +03:00
|
|
|
int color, int fill_color, unsigned layer);
|
2016-07-25 06:50:48 +03:00
|
|
|
void fig_circ(int x, int y, int r, int color, int fill_color, unsigned layer);
|
2016-07-25 08:59:33 +03:00
|
|
|
void fig_arc(int x, int y, int r, int sa, int ea,
|
|
|
|
int color, int fill_color, unsigned layer);
|
2016-07-23 06:48:59 +03:00
|
|
|
void fig_text(int x, int y, const char *s, unsigned size,
|
|
|
|
enum text_align align, int rot, unsigned color, unsigned layer);
|
|
|
|
|
2016-07-22 05:54:32 +03:00
|
|
|
/* inititalization */
|
|
|
|
|
2016-07-26 09:15:13 +03:00
|
|
|
void fig_init(const char *template, int n_vars, const char **vars);
|
2016-07-22 05:54:32 +03:00
|
|
|
|
|
|
|
#endif /* !FIG_H */
|