Re: Gdk RGBA color

On Wed, Jan 23, 2013 at 6:22 PM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 13.08.2012 23:41, Torsten Schoenfeld wrote:

On 13.08.2012 17:33, zentara wrote:

$textview1->override_background_color('normal', Gtk3::Gdk::RGBA(
0,0,0,1 ) );

Gtk3::Gdk::RGBA->new (...) should work, but doesn't currently.  That's a
genuine hole in the bindings: GdkRGBA is a boxed type which doesn't have
a constructor, which is something Glib::Object::Introspection doesn't
support at the moment.  Usually, structs that you are supposed to create
manually (which is something G:O:I does support) don't have a boxed type
associated to them.  If GdkRGBA didn't have a boxed type, then {red=>1,
green=>1, ...} would work wherever a GdkRGBA is expected.

It looks like we need to add a standard constructor for boxed types
which don't provide one already.

This is now done with these two commits:


Sorry, little help here please.  When I try examples from the new
Gtk3::Gdk::RGBA tests you linked to, I get:

Gtk3::Gdk::RGBA=SCALAR(0x10b9f60) is not of type Gtk3::Gdk::Color at
line 59

Obviously you would not have pushed them if they didn't work, so
apparently 'm doing something wrong... and all I'm doing are things

my $rgba = Gtk3::Gdk::RGBA->new ({red => 0.0, green => 0.5, blue =>
0.5, alpha => 0.5});

Dave M

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]