Ejemplo n.º 1
0
static int
meta_fill (GnomePrintContext *pc, const ArtBpath *bpath, ArtWindRule rule)
{
	meta_color (pc);

	gpm_encode_int (pc, GNOME_META_FILL);
	gpm_encode_bpath (pc, bpath);
	gpm_encode_int (pc, rule);

	return GNOME_PRINT_OK;
}
Ejemplo n.º 2
0
static int
meta_stroke (GnomePrintContext *pc, const ArtBpath *bpath)
{
	meta_color (pc);
	meta_line (pc);
	meta_dash (pc);

	gpm_encode_int (pc, GNOME_META_STROKE);
	gpm_encode_bpath (pc, bpath);

	return GNOME_PRINT_OK;
}
Ejemplo n.º 3
0
void parse_color_def(struct high_color **color_list, unsigned char *p, unsigned char *name, int line)
{
    unsigned char bf[256];
    if (!parse_tows(&p, bf))
    {
        struct high_color *color, *gcolor;

        /* Find color */
        color = find_color(*color_list, bf, name);

        /* If it doesn't exist, create it */
        if (!color)
        {
            color = joe_malloc(sizeof(struct high_color));
            color->name = zdup(bf);
            color->color = 0;
            color->next = *color_list;
            *color_list = color;
        }
        else
        {
            i_printf_2((char *)joe_gettext(_("%s %d: Class already defined\n")), name, line);
        }

        /* Find it in global list */
        if (color_list != &global_colors && (gcolor = find_color(global_colors, bf, name)))
        {
            color->color = gcolor->color;
        }
        else
        {
            /* Parse color definition */
            while (parse_ws(&p, '#'), !parse_ident(&p, bf, sizeof(bf)))
            {
                color->color |= meta_color(bf);
            }
        }
    }
    else
    {
        i_printf_2((char *)joe_gettext(_("%s %d: Missing class name\n")), name, line);
    }
}