summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-05-15 17:19:53 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-05-15 17:20:30 -0400
commit4dd4d96fb11354e37f662eaabb1d874dbf47e368 (patch)
tree9adfdb4d178091725b1939d60611ee654d96e984
parent2321b91cbad7f9531ab99a7b1875eba0dcc167db (diff)
[cairo-surface] Add cairo_surface_get_fallback_resolution()
-rw-r--r--doc/public/cairo-sections.txt1
-rw-r--r--doc/public/tmpl/cairo-surface.sgml10
-rw-r--r--src/cairo-surface.c23
-rw-r--r--src/cairo.c3
-rw-r--r--src/cairo.h5
-rwxr-xr-xsrc/cairoint.h4
6 files changed, 46 insertions, 0 deletions
diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt
index 1696f15f..b71b97a9 100644
--- a/doc/public/cairo-sections.txt
+++ b/doc/public/cairo-sections.txt
@@ -163,6 +163,7 @@ cairo_surface_mark_dirty_rectangle
cairo_surface_set_device_offset
cairo_surface_get_device_offset
cairo_surface_set_fallback_resolution
+cairo_surface_get_fallback_resolution
cairo_surface_type_t
cairo_surface_get_type
cairo_surface_get_reference_count
diff --git a/doc/public/tmpl/cairo-surface.sgml b/doc/public/tmpl/cairo-surface.sgml
index 07acd372..20a1d354 100644
--- a/doc/public/tmpl/cairo-surface.sgml
+++ b/doc/public/tmpl/cairo-surface.sgml
@@ -164,6 +164,16 @@ cairo_<emphasis>backend</emphasis>_surface_create().
@y_pixels_per_inch:
+<!-- ##### FUNCTION cairo_surface_get_fallback_resolution ##### -->
+<para>
+
+</para>
+
+@surface:
+@x_pixels_per_inch:
+@y_pixels_per_inch:
+
+
<!-- ##### ENUM cairo_surface_type_t ##### -->
<para>
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index edb1d757..b86c8a14 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -915,6 +915,29 @@ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
}
slim_hidden_def (cairo_surface_set_fallback_resolution);
+/**
+ * cairo_surface_get_fallback_resolution:
+ * @surface: a #cairo_surface_t
+ * @x_pixels_per_inch: horizontal pixels per inch
+ * @y_pixels_per_inch: vertical pixels per inch
+ *
+ * This function returns the previous fallback resolution set by
+ * cairo_surface_set_fallback_resolution(), or default fallback
+ * resolution if never set.
+ *
+ * Since: 1.8
+ **/
+void
+cairo_surface_get_fallback_resolution (cairo_surface_t *surface,
+ double *x_pixels_per_inch,
+ double *y_pixels_per_inch)
+{
+ if (x_pixels_per_inch)
+ *x_pixels_per_inch = surface->x_fallback_resolution;
+ if (y_pixels_per_inch)
+ *y_pixels_per_inch = surface->y_fallback_resolution;
+}
+
cairo_bool_t
_cairo_surface_has_device_transform (cairo_surface_t *surface)
{
diff --git a/src/cairo.c b/src/cairo.c
index 1a0da690..e03ad26f 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1268,6 +1268,7 @@ cairo_set_matrix (cairo_t *cr,
if (status)
_cairo_set_error (cr, status);
}
+slim_hidden_def (cairo_set_matrix);
/**
* cairo_identity_matrix:
@@ -2756,6 +2757,7 @@ cairo_set_font_size (cairo_t *cr, double size)
if (status)
_cairo_set_error (cr, status);
}
+slim_hidden_def (cairo_set_font_size);
/**
* cairo_set_font_matrix
@@ -2831,6 +2833,7 @@ cairo_set_font_options (cairo_t *cr,
_cairo_gstate_set_font_options (cr->gstate, options);
}
+slim_hidden_def (cairo_set_font_options);
/**
* cairo_get_font_options:
diff --git a/src/cairo.h b/src/cairo.h
index 2116f003..19ef7f0d 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -1669,6 +1669,11 @@ cairo_surface_set_fallback_resolution (cairo_surface_t *surface,
double y_pixels_per_inch);
cairo_public void
+cairo_surface_get_fallback_resolution (cairo_surface_t *surface,
+ double *x_pixels_per_inch,
+ double *y_pixels_per_inch);
+
+cairo_public void
cairo_surface_copy_page (cairo_surface_t *surface);
cairo_public void
diff --git a/src/cairoint.h b/src/cairoint.h
index beca1747..8716bd47 100755
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -2357,8 +2357,12 @@ slim_hidden_proto (cairo_scaled_font_get_font_options);
slim_hidden_proto (cairo_scaled_font_glyph_extents);
slim_hidden_proto_no_warn (cairo_scaled_font_reference);
slim_hidden_proto (cairo_scaled_font_status);
+slim_hidden_proto (cairo_set_font_size);
+slim_hidden_proto (cairo_set_font_options);
+slim_hidden_proto (cairo_set_matrix);
slim_hidden_proto (cairo_set_operator);
slim_hidden_proto (cairo_set_source);
+slim_hidden_proto (cairo_set_source);
slim_hidden_proto (cairo_set_source_surface);
slim_hidden_proto (cairo_status);
slim_hidden_proto (cairo_stroke_preserve);