if (g_ascii_strncasecmp (p, "bgcolor", len) == 0) {
NEW_COMPONENT (RSPAMD_HTML_COMPONENT_BGCOLOR);
}
- else if (g_ascii_strncasecmp (p, "opacity", len) == 0) {
- NEW_COMPONENT (RSPAMD_HTML_COMPONENT_OPACITY);
- }
}
else if (len == 4) {
if (g_ascii_strncasecmp (p, "size", len) == 0) {
&bl->font_color);
msg_debug_html ("got color: %xd", bl->font_color.d.val);
break;
- case RSPAMD_HTML_COMPONENT_OPACITY:
- rspamd_strlcpy (numbuf, comp->start,
- MIN (sizeof (numbuf), comp->len + 1));
- opacity = strtod (numbuf, NULL);
-
- if (opacity > 1) {
- opacity = 1;
- }
- else if (opacity < 0) {
- opacity = 0;
- }
-
- bl->font_color.d.comp.alpha = (guint8)(opacity * 255.0);
- break;
default:
/* NYI */
break;
RSPAMD_HTML_COMPONENT_WIDTH,
RSPAMD_HTML_COMPONENT_HEIGHT,
RSPAMD_HTML_COMPONENT_SIZE,
- RSPAMD_HTML_COMPONENT_OPACITY
};
struct html_tag_component {