[gtk+] docs: Clarify gtk_render_icon()'s behaviour
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] docs: Clarify gtk_render_icon()'s behaviour
- Date: Wed, 4 Nov 2015 11:53:10 +0000 (UTC)
commit f959b350640040f08fe91d4ac3dff449ae056502
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Nov 4 11:45:41 2015 +0000
docs: Clarify gtk_render_icon()'s behaviour
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.
You should be using gtk_render_icon_surface() anyway.
gtk/gtkrender.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrender.c b/gtk/gtkrender.c
index 20c014d..4f986bb 100644
--- a/gtk/gtkrender.c
+++ b/gtk/gtkrender.c
@@ -1205,6 +1205,13 @@ gtk_render_icon_pixbuf (GtkStyleContext *context,
*
* Renders the icon in @pixbuf at the specified @x and @y coordinates.
*
+ * This function will render the icon in @pixbuf at exactly its size,
+ * regardless of scaling factors, which may not be appropriate when
+ * drawing on displays with high pixel densities.
+ *
+ * You probably want to use gtk_render_icon_surface() instead, if you
+ * already have a Cairo surface.
+ *
* Since: 3.2
**/
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]