mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 06:54:03 +02:00
eeshow/fig.c: output all user-defined colors
This commit is contained in:
parent
5edf1923f0
commit
f08f43d706
12
eeshow/fig.c
12
eeshow/fig.c
@ -201,10 +201,12 @@ static void fig_header(void)
|
||||
}
|
||||
|
||||
|
||||
static void fig_color32(void)
|
||||
static void fig_colors(void)
|
||||
{
|
||||
/* User32, COLOR_DARK_YELLOW */
|
||||
printf("0 32 #848400\n");
|
||||
unsigned i;
|
||||
|
||||
for (i = 32; i != n_color_rgb; i++)
|
||||
printf("0 %d #%06x\n", i, color_rgb[i]);
|
||||
|
||||
}
|
||||
|
||||
@ -266,7 +268,7 @@ static void *fig_init(int argc, char *const *argv)
|
||||
|
||||
if (!template) {
|
||||
fig_header();
|
||||
fig_color32();
|
||||
fig_colors();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -279,7 +281,7 @@ static void *fig_init(int argc, char *const *argv)
|
||||
if (*buf == '#')
|
||||
continue;
|
||||
if (!--lines_to_colors)
|
||||
fig_color32();
|
||||
fig_colors();
|
||||
/*
|
||||
* @@@ known bug: if the template is empty, we won't output
|
||||
* color 32.
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "style.h"
|
||||
|
||||
|
||||
@ -37,3 +38,5 @@ uint32_t color_rgb[] = {
|
||||
[COLOR_DARK_YELLOW] = 0x848400,
|
||||
[COLOR_LIGHT_GREY] = 0xd0d0d0,
|
||||
};
|
||||
|
||||
unsigned n_color_rgb = ARRAY_ELEMENTS(color_rgb);
|
||||
|
@ -97,5 +97,6 @@
|
||||
#define MISSING_HEIGHT 300
|
||||
|
||||
extern uint32_t color_rgb[];
|
||||
extern unsigned n_color_rgb;
|
||||
|
||||
#endif /* !STYLE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user