 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
William J Giddings Familiar Face
Joined: 17 Jan 2010 Posts: 42
|
Posted: Mon Mar 15, 2010 12:07 pm Post subject: GdkPixbuf properties: "width", "height" |
|
|
I'm just putting some of the final touches to the Gnocl Tcl bindings to the GdkPixbuf libraries and I'm just looking through the docs to see if there's anything left untouched.
The docs give a list of properties for a pixbuf, much like a GtkWidget - fine; but all the source code that I've examined creates a buffer explicitly rather than allowing reconfiguration.
I am correct in assuming, then, that these properties are read-only rather than re-configurable?
My gnocl libraries can fetch values for these properties like any other object, but I don't see a way to configure or intialialize a buffer using them. What would be the point? A buffer is static, resizing etc., simply results in the creation of a new buffer.
WJG |
|
| Back to top |
|
 |
tadeboro Never Seen the Sunlight
Joined: 23 Jul 2008 Posts: 2114 Location: Slovenia
|
Posted: Mon Mar 15, 2010 3:09 pm Post subject: |
|
|
Hello.
These properties are read-only as far as application developer is concerned. Treat them this way and you'll stay out of trouble.
But technically speaking, these properties can be written once - at object creation. API docs indicate this by appending "Read / Write / Construct Only" after the property. For example, one can say: "GdkPixbuf:width property is readable, but can only be written at construction time". For more details, see GObject API docs on g_object_class_install_property(), g_param_spec_*() family of function and on GParamFlags.
Tadej |
|
| Back to top |
|
 |
William J Giddings Familiar Face
Joined: 17 Jan 2010 Posts: 42
|
Posted: Mon Mar 15, 2010 8:59 pm Post subject: Thanks for confirming my expectations. |
|
|
Tadej
Thanks for looking into this one. I read the docs earlier and saw the passage in the text that you mention. I've cracked this one now and have moved onto the issue of passing parameters to the gdk_pixbuf_save function.
WJG |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|