19#ifndef DT_SYSTEM_SURFACE_SCALING_H
20#define DT_SYSTEM_SURFACE_SCALING_H
39 cairo_surface_t *cst = cairo_image_surface_create(format,
width * scale,
height * scale);
40 cairo_surface_set_device_scale(cst, scale, scale);
45 cairo_format_t format,
int width,
46 int height,
int stride,
double scale)
48 cairo_surface_t *cst = cairo_image_surface_create_for_data(
data, format,
width,
height, stride);
49 cairo_surface_set_device_scale(cst, scale, scale);
55 cairo_surface_t *cst = cairo_image_surface_create_from_png(filename);
56 cairo_surface_set_device_scale(cst, scale, scale);
65 return cairo_image_surface_get_width(surface) / scale;
70 return cairo_image_surface_get_height(surface) / scale;
static cairo_surface_t * dt_cairo_surface_create_from_png_at_scale(const char *filename, double scale)
static int dt_cairo_surface_logical_width(cairo_surface_t *surface, double scale)
static int dt_cairo_surface_logical_height(cairo_surface_t *surface, double scale)
static cairo_surface_t * dt_cairo_surface_create_for_data_at_scale(unsigned char *data, cairo_format_t format, int width, int height, int stride, double scale)
static G_BEGIN_DECLS cairo_surface_t * dt_cairo_surface_create_at_scale(cairo_format_t format, int width, int height, double scale)