Searched defs:buf (Results 1 - 25 of 45) sorted by relevance

12

/inkscape/src/svg/
H A Dcss-ostringstream.cpp23 char buf[32]; // haven't thought about how much is really required. local
25 case 9: g_ascii_formatd(buf, sizeof(buf), "%.9f", d); break;
26 case 8: g_ascii_formatd(buf, sizeof(buf), "%.8f", d); break;
27 case 7: g_ascii_formatd(buf, sizeof(buf), "%.7f", d); break;
28 case 6: g_ascii_formatd(buf, sizeof(buf), "%.6f", d); break;
29 case 5: g_ascii_formatd(buf, sizeo
[all...]
H A Dsvg-length.cpp63 static unsigned int sp_svg_number_write_ui(gchar *buf, unsigned int val) argument
72 memcpy(buf, &c[16u - i], i);
73 buf[i] = 0;
80 static unsigned int sp_svg_number_write_i(gchar *buf, int bufLen, int val) argument
85 buf[p++] = '-';
91 p += sp_svg_number_write_ui(buf+p, uval);
98 static unsigned sp_svg_number_write_d(gchar *buf, int bufLen, double val, unsigned int tprec, unsigned int fprec) argument
103 buf[i++] = '-';
122 i += sp_svg_number_write_ui(buf + i, (unsigned int)floor(dival/pow(10.0, idigits-tprec) + .5));
124 buf[
149 sp_svg_number_write_de(gchar *buf, int bufLen, double val, unsigned int tprec, int min_exp) argument
[all...]
H A Dsvg-length-test.h149 char buf[256] = {0}; local
150 memset(buf, 0xCC, sizeof(buf)); // Make it easy to detect an overrun.
151 unsigned int retval = sp_svg_number_write_de( buf, sizeof(buf), precTests[i].val, precTests[i].prec, precTests[i].minexp );
153 TSM_ASSERT_EQUALS("Numeric string written", std::string(buf), std::string(precTests[i].str));
154 TSM_ASSERT_EQUALS(std::string("Buffer overrun ") + precTests[i].str, '\xCC', buf[retval + 1]); local
H A Dsvg-color.cpp406 gchar *buf = (gchar *) g_malloc(end + 1 - str); local
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) argument
462 sprintf(buf, "#%x%x%x",
467 sprintf(buf, "#
[all...]
/inkscape/src/display/
H A Dsp-ctrlquadr.cpp35 static void sp_ctrlquadr_render (SPCanvasItem *item, SPCanvasBuf *buf);
69 sp_ctrlquadr_render (SPCanvasItem *item, SPCanvasBuf *buf) argument
73 if (!buf->ct)
77 cairo_new_path(buf->ct);
79 Geom::Point min = buf->rect.min();
86 cairo_move_to(buf->ct, p1[Geom::X], p1[Geom::Y]);
87 cairo_line_to(buf->ct, p2[Geom::X], p2[Geom::Y]);
88 cairo_line_to(buf->ct, p3[Geom::X], p3[Geom::Y]);
89 cairo_line_to(buf->ct, p4[Geom::X], p4[Geom::Y]);
90 cairo_line_to(buf
[all...]
H A Dsp-ctrlline.cpp36 void sp_ctrlline_render(SPCanvasItem *item, SPCanvasBuf *buf);
72 void sp_ctrlline_render(SPCanvasItem *item, SPCanvasBuf *buf) argument
76 if (!buf->ct) {
87 ink_cairo_set_source_rgba32(buf->ct, 0xffffffbf);
88 cairo_set_line_width(buf->ct, 2);
89 cairo_new_path(buf->ct);
91 cairo_move_to(buf->ct, s[Geom::X] - buf->rect.left(), s[Geom::Y] - buf->rect.top());
92 cairo_line_to(buf
[all...]
H A Dsodipodi-ctrlrect.cpp32 static void sp_ctrlrect_render(SPCanvasItem *item, SPCanvasBuf *buf);
60 static void sp_ctrlrect_render(SPCanvasItem *item, SPCanvasBuf *buf) argument
62 SP_CTRLRECT(item)->render(buf);
93 void CtrlRect::render(SPCanvasBuf *buf) argument
104 if ( area_w_shadow.intersects(buf->rect) )
107 cairo_save(buf->ct);
108 cairo_translate(buf->ct, -buf->rect.left(), -buf->rect.top());
109 cairo_set_line_width(buf
[all...]
H A Dsp-ctrlcurve.cpp29 static void sp_ctrlcurve_render(SPCanvasItem *item, SPCanvasBuf *buf);
68 sp_ctrlcurve_render(SPCanvasItem *item, SPCanvasBuf *buf) argument
72 if (!buf->ct)
80 ink_cairo_set_source_rgba32(buf->ct, cl->rgba);
81 cairo_set_line_width(buf->ct, 1);
82 cairo_new_path(buf->ct);
89 cairo_move_to (buf->ct, p0[Geom::X] - buf->rect.left(), p0[Geom::Y] - buf->rect.top());
90 cairo_curve_to (buf
[all...]
H A Dcanvas-bpath.cpp30 static void sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf);
103 sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf) argument
107 Geom::Rect area = buf->rect;
114 if (!buf->ct)
120 cairo_set_tolerance(buf->ct, 0.5);
121 cairo_new_path(buf->ct);
123 feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area,
128 ink_cairo_set_source_rgba32(buf->ct, cbp->fill_rgba);
129 cairo_set_fill_rule(buf->ct, cbp->fill_rule == SP_WIND_RULE_EVENODD? CAIRO_FILL_RULE_EVEN_ODD
131 cairo_fill_preserve(buf
[all...]
H A Dcanvas-arena.cpp37 static void sp_canvas_arena_render (SPCanvasItem *item, SPCanvasBuf *buf);
188 sp_canvas_arena_render (SPCanvasItem *item, SPCanvasBuf *buf) argument
193 Geom::OptIntRect r = buf->rect;
196 Inkscape::DrawingContext dc(buf->ct, r->min());
H A Dcanvas-text.cpp28 static void sp_canvastext_render (SPCanvasItem *item, SPCanvasBuf *buf);
80 sp_canvastext_render (SPCanvasItem *item, SPCanvasBuf *buf) argument
84 if (!buf->ct)
87 cairo_set_font_size(buf->ct, cl->fontsize);
91 cairo_text_extents(buf->ct, cl->text, &extents);
93 cairo_rectangle(buf->ct, item->x1 - buf->rect.left(),
94 item->y1 - buf->rect.top(),
98 ink_cairo_set_source_rgba32(buf->ct, cl->rgba_background);
99 cairo_fill(buf
[all...]
H A Dguideline.cpp28 static void sp_guideline_render(SPCanvasItem *item, SPCanvasBuf *buf);
32 static void sp_guideline_drawline (SPCanvasBuf *buf, gint x0, gint y0, gint x1, gint y1, guint32 rgba);
77 static void sp_guideline_render(SPCanvasItem *item, SPCanvasBuf *buf) argument
85 cairo_save(buf->ct);
86 cairo_translate(buf->ct, -buf->rect.left(), -buf->rect.top());
87 ink_cairo_set_source_rgba32(buf->ct, gl->rgba);
88 cairo_set_line_width(buf->ct, 1);
89 cairo_set_line_cap(buf
280 sp_guideline_drawline(SPCanvasBuf *buf, gint x0, gint y0, gint x1, gint y1, guint32 ) argument
[all...]
H A Dsp-canvas.h56 unsigned char *buf; member in struct:SPCanvasBuf
H A Dsodipodi-ctrl.cpp32 static void sp_ctrl_render (SPCanvasItem *item, SPCanvasBuf *buf);
489 sp_ctrl_render (SPCanvasItem *item, SPCanvasBuf *buf) argument
513 cairo_set_source_surface(cr, cairo_get_target(buf->ct), buf->rect.left(), buf->rect.top());
542 cairo_save(buf->ct);
543 cairo_set_source_surface(buf->ct, work,
544 ctrl->box.left() - buf->rect.left(), ctrl->box.top() - buf->rect.top());
545 cairo_rectangle(buf
[all...]
/inkscape/src/trace/
H A Dimagemap-gdk.cpp10 GrayMap *gdkPixbufToGrayMap(GdkPixbuf *buf) argument
12 if (!buf)
15 int width = gdk_pixbuf_get_width(buf);
16 int height = gdk_pixbuf_get_height(buf);
17 guchar *pixdata = gdk_pixbuf_get_pixels(buf);
18 int rowstride = gdk_pixbuf_get_rowstride(buf);
19 int n_channels = gdk_pixbuf_get_n_channels(buf);
59 GdkPixbuf *buf = gdk_pixbuf_new_from_data(pixdata, GDK_COLORSPACE_RGB, local
78 return buf;
87 PackedPixelMap *gdkPixbufToPackedPixelMap(GdkPixbuf *buf) argument
130 gdkPixbufToRgbMap(GdkPixbuf *buf) argument
188 GdkPixbuf *buf = gdk_pixbuf_new_from_data(pixdata, GDK_COLORSPACE_RGB, local
[all...]
/inkscape/src/io/
H A Dsys.cpp374 Glib::ustring buf; local
380 buf.append("\\\\");
382 buf += (char)(*ptr);
385 buf.append((const char*)scratch);
389 result = g_strdup(buf.c_str());
H A Dinkjar.cpp333 int JarFile::read(guint8 *buf, unsigned int count) argument
336 if ((nbytes = fread(buf, 1, count, _file)) != count) {
H A Dinkscapestream.cpp255 Glib::ustring buf = readWord(); local
256 if (buf == "true")
265 Glib::ustring buf = readWord(); local
267 if (getLong(buf, &ival))
274 Glib::ustring buf = readWord(); local
276 if (getULong(buf, &ival))
283 Glib::ustring buf = readWord(); local
285 if (getLong(buf, &ival))
292 Glib::ustring buf = readWord(); local
294 if (getULong(buf,
301 Glib::ustring buf = readWord(); local
310 Glib::ustring buf = readWord(); local
319 Glib::ustring buf = readWord(); local
328 Glib::ustring buf = readWord(); local
480 gchar *buf = g_strdup_vprintf(fmt, args); local
554 gchar *buf = g_strdup_printf("%d", val); local
569 gchar *buf = g_strdup_printf("%u", val); local
582 gchar *buf = g_strdup_printf("%d", val); local
595 gchar *buf = g_strdup_printf("%u", val); local
608 gchar *buf = g_strdup_printf("%ld", val); local
621 gchar *buf = g_strdup_printf("%lu", val); local
635 gchar *buf = g_strdup_printf("%8.3f", val); local
653 gchar *buf = g_strdup_printf("%8.3f", val); local
[all...]
/inkscape/src/libdepixelize/
H A Dkopftracer2011.cpp87 Splines Kopf2011::to_voronoi(const Glib::RefPtr<Gdk::Pixbuf const> &buf, argument
92 = _voronoi<Precision, false>(buf, options);
106 return Splines(_voronoi<Precision, false>(buf, options));
116 Splines Kopf2011::to_grouped_voronoi(const Glib::RefPtr<Gdk::Pixbuf const> &buf, argument
121 = _voronoi<Precision, false>(buf, options);
130 (buf, options));
187 Splines Kopf2011::to_splines(const Glib::RefPtr<Gdk::Pixbuf const> &buf, argument
192 = _voronoi<Precision, true>(buf, options);
217 (buf, options));
224 Kopf2011::_voronoi(const Glib::RefPtr<Gdk::Pixbuf const> &buf, argument
[all...]
/inkscape/src/ui/dialog/
H A Dicon-preview.cpp480 Glib::RefPtr<Gdk::Pixbuf> buf = images[hot]->get_pixbuf()->scale_simple( 128, 128, Gdk::INTERP_NEAREST ); local
482 magnified.set( buf );
/inkscape/src/extension/internal/
H A Djavafx-out.cpp142 char buf[80]; local
143 snprintf(buf, 79, "Color.rgb(0x%02x, 0x%02x, 0x%02x, %s)",
145 JavaFXOutput::String s = buf;
709 char buf[16]; local
710 sprintf(buf, "id%d", idindex++);
711 id = buf;
775 char buf[16]; local
776 sprintf(buf, "id%d", idindex++);
777 id = buf;
H A Dpov-out.cpp463 char buf[16]; local
464 sprintf(buf, "id%d", idIndex++);
465 id = buf;
/inkscape/src/
H A Ddeptool.cpp807 String buf; local
812 buf.append(readBuf);
816 fileSize = buf.size();
817 fileBuf = (char *)buf.c_str();
/inkscape/src/libcroco/
H A Dcr-input.c206 guchar *buf = NULL; local
243 buf = g_realloc (buf, len + CR_INPUT_MEM_CHUNK_SIZE);
244 memcpy (buf + len, tmp_buf, nb_read);
251 result = cr_input_new_from_buf (buf, len, a_enc, TRUE);
256 *we should free buf here because it's own by CRInput.
259 buf = NULL ;
268 if (buf) {
269 g_free (buf);
270 buf
[all...]
/inkscape/src/ui/widget/
H A Dcolor-slider.cpp538 static guchar *buf = NULL; local
544 if (buf && (bs < width * height)) {
545 g_free(buf);
546 buf = NULL;
548 if (!buf) {
549 buf = g_new(guchar, width * height * 3);
553 dp = buf;
585 return buf;
593 static guchar *buf = NULL; local
598 if (buf
[all...]

Completed in 77 milliseconds

12