Lines Matching defs:surface
64 // include support for only the compiled-in surface types
190 * \brief Creates a new render context which will be compatible with the given context's Cairo surface
192 * \param width width of the surface to be created
193 * \param height height of the surface to be created
202 cairo_surface_t *surface = cairo_surface_create_similar(cairo_get_target(_cr), CAIRO_CONTENT_COLOR_ALPHA,
204 new_context->_cr = cairo_create(surface);
205 new_context->_surface = surface;
222 // format cannot be set on an already initialized surface
660 // Cairo surface is expecting the mask to be 96 dpi.
672 TRACE(("mask surface: %f x %f at %i dpi\n", surface_width, surface_height, _dpi ));
779 // Is the surface already set up?
796 cairo_surface_t *surface = NULL;
801 surface = cairo_image_surface_create(_target_format, (int)ceil(width), (int)ceil(height));
805 surface = cairo_pdf_surface_create_for_stream(Inkscape::Extension::Internal::_write_callback, _stream, width, height);
806 cairo_pdf_surface_restrict_to_version(surface, (cairo_pdf_version_t)_pdf_level);
811 surface = cairo_ps_surface_create_for_stream(Inkscape::Extension::Internal::_write_callback, _stream, width, height);
812 if(CAIRO_STATUS_SUCCESS != cairo_surface_status(surface)) {
815 cairo_ps_surface_restrict_to_level(surface, (cairo_ps_level_t)_ps_level);
816 cairo_ps_surface_set_eps(surface, (cairo_bool_t) _eps);
819 // cairo_ps_dsc_comment(surface, os_bbox.str().c_str());
820 // cairo_ps_dsc_begin_page(surface);
821 // cairo_ps_dsc_comment(surface, os_pagebbox.str().c_str());
830 return _finishSurfaceSetup (surface, &ctm);
834 CairoRenderContext::setSurfaceTarget(cairo_surface_t *surface, bool is_vector, cairo_matrix_t *ctm)
836 if (_is_valid || !surface)
840 bool ret = _finishSurfaceSetup (surface, ctm);
842 cairo_surface_reference (surface);
847 CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t *ctm)
849 if(surface == NULL) {
852 if(CAIRO_STATUS_SUCCESS != cairo_surface_status(surface)) {
856 _cr = cairo_create(surface);
862 _surface = surface;
1055 // Calculate the size of the surface which has to be created
1057 // Cairo requires an integer pattern surface width/height.
1062 TRACE(("pattern surface size: %f x %f\n", surface_width, surface_height));
1066 // adjust the size of the painted pattern to fit exactly the created surface
1067 // this has to be done because of the rounding to obtain an integer pattern surface width/height
1149 // Cairo requires an integer pattern surface width/height.
1559 TRACE(("Image surface creation failed:\n%s\n", cairo_status_to_string(cairo_surface_status(image_surface))));
1578 // See cairo-pdf-surface.c