draw: remove shadow support
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
486e13eba0
commit
b5fb612ea3
|
@ -49,10 +49,6 @@ List of *awesome* markup elements and their attributes:
|
|||
- image: path to a background image
|
||||
- align: background image alignment
|
||||
- resize: resize background image to text size
|
||||
* text
|
||||
- shadow: shadow color
|
||||
- shadow_offset: shadow color offset in pixel
|
||||
|
||||
|
||||
A Pango markup example: <span weight="bold" foreground="#336699">...</span>.
|
||||
|
||||
|
|
|
@ -72,8 +72,6 @@ right
|
|||
role
|
||||
screen
|
||||
selected
|
||||
shadow
|
||||
shadow_offset
|
||||
Shift
|
||||
size_hints
|
||||
skip_taskbar
|
||||
|
|
30
draw.c
30
draw.c
|
@ -201,22 +201,6 @@ draw_markup_on_element(markup_parser_data_t *p, const char *elem,
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case 't': /* text */
|
||||
for(; *names; names++, values++)
|
||||
switch(a_tokenize(*names, -1))
|
||||
{
|
||||
case A_TK_SHADOW:
|
||||
reqs[++reqs_nbr] = xcolor_init_unchecked(&data->shadow.color,
|
||||
*values,
|
||||
a_strlen(*values));
|
||||
break;
|
||||
case A_TK_SHADOW_OFFSET:
|
||||
data->shadow.offset = atoi(*values);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for(i = 0; i <= reqs_nbr; i++)
|
||||
|
@ -230,7 +214,7 @@ static bool
|
|||
draw_text_markup_expand(draw_parser_data_t *data,
|
||||
const char *str, ssize_t slen)
|
||||
{
|
||||
static char const * const elements[] = { "bg", "bg_margin", "text", NULL };
|
||||
static char const * const elements[] = { "bg", "bg_margin", NULL };
|
||||
markup_parser_data_t p =
|
||||
{
|
||||
.elements = elements,
|
||||
|
@ -383,18 +367,6 @@ draw_text(draw_context_t *ctx, font_t *font, PangoEllipsizeMode ellip, PangoWrap
|
|||
break;
|
||||
}
|
||||
|
||||
if(pdata->shadow.offset)
|
||||
{
|
||||
cairo_set_source_rgba(ctx->cr,
|
||||
pdata->shadow.color.red / 65535.0,
|
||||
pdata->shadow.color.green / 65535.0,
|
||||
pdata->shadow.color.blue / 65535.0,
|
||||
pdata->shadow.color.alpha / 65535.0);
|
||||
cairo_move_to(ctx->cr, x + pdata->shadow.offset, y + pdata->shadow.offset);
|
||||
pango_cairo_layout_path(ctx->cr, ctx->layout);
|
||||
cairo_stroke(ctx->cr);
|
||||
}
|
||||
|
||||
cairo_move_to(ctx->cr, x, y);
|
||||
|
||||
cairo_set_source_rgba(ctx->cr,
|
||||
|
|
5
draw.h
5
draw.h
|
@ -170,11 +170,6 @@ typedef struct
|
|||
image_t *bg_image;
|
||||
alignment_t bg_align;
|
||||
bool bg_resize;
|
||||
struct
|
||||
{
|
||||
int offset;
|
||||
xcolor_t color;
|
||||
} shadow;
|
||||
} draw_parser_data_t;
|
||||
|
||||
void draw_text(draw_context_t *, font_t *, PangoEllipsizeMode, PangoWrapMode, alignment_t, padding_t *, area_t, const char *, ssize_t len, draw_parser_data_t *, area_t *);
|
||||
|
|
Loading…
Reference in New Issue