zentara has asked for the wisdom of the Perl Monks concerning the following question:
#from some Gtk2 code my $hex = sprintf( "0x%02x%02x%02x40", $radj1->value, # 0..255 $gadj2->value, # 0..255 $badj3->value, # 0..255 ); print "$hex\n"; # something like 0x3cb37140 appears # and is what the fill-color-rgba wants below # but it claims it's not numeric $hex += 0x1; $hex -= 0x1; my $resp= ($hex) ? "$hex is numeric\n" : "$hex is not numeric\n"; print $resp; $rect->set('fill-color-rgba' => $hex ); # claims $hex is not numeric
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: convert hex string to hex number
by pc88mxer (Vicar) on Jul 02, 2008 at 21:41 UTC | |
by Narveson (Chaplain) on Jul 02, 2008 at 22:03 UTC | |
|
Re: convert hex string to hex number
by shmem (Chancellor) on Jul 02, 2008 at 22:25 UTC | |
|
Re: convert hex string to hex number
by waldner (Beadle) on Jul 02, 2008 at 21:53 UTC | |
|
Re: convert hex string to hex number
by FunkyMonk (Bishop) on Jul 02, 2008 at 21:50 UTC | |
by grantm (Parson) on Jul 02, 2008 at 23:19 UTC | |
by shmem (Chancellor) on Jul 03, 2008 at 11:23 UTC | |
by Anonymous Monk on Jan 04, 2012 at 14:07 UTC | |
|
Re: convert hex string to hex number
by zentara (Cardinal) on Jul 03, 2008 at 12:48 UTC | |
by tobyink (Canon) on Jan 04, 2012 at 14:41 UTC |