Lines Matching defs:buf
406 gchar *buf = (gchar *) g_malloc(end + 1 - str);
407 memcpy(buf, str, end - str);
408 buf[end - str] = '\0';
409 gchar const *buf_end = buf;
410 guint32 const check = internal_sp_svg_read_color(buf, &buf_end, 1);
412 && buf_end - buf == end - str);
413 g_free(buf);
427 static void rgb24_to_css(char *const buf, unsigned const rgb24)
462 sprintf(buf, "#%x%x%x",
467 sprintf(buf, "#%06x", rgb24);
473 strcpy(buf, src);
476 // assert(sp_svg_read_color(buf, 0xff) == (rgb24 << 8));
486 void sp_svg_write_color(gchar *buf, unsigned const buflen, guint32 const rgba32)
493 rgb24_to_css(buf, rgb24);
495 g_snprintf(buf, buflen, "#%06x", rgb24);