Forum: Ruby-Gnome 2 pango::layout background color

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8e6374c0ef7b66942f34798e31edf014?d=identicon&s=25 Dobai-Pataky Bálint (Guest)
on 2007-01-16 14:54
(Received via mailing list)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2007-01-19 16:20
(Received via mailing list)
Hi,

In <45ACD8FA.8030708@gmail.com>
  "[ruby-gnome2-devel-en] pango::layout background color" on Tue, 16 Jan
2007 15:54:02 +0200,
  Dobai-Pataky Bálint <dpblnt@gmail.com> wrote:

> i finally generate a print preview for my treeviews.
> i wanna set the background color of the columns' headers. they are
> pango::layouts.
> if anyone know how to, please guide me.

Could you show us your sample script?


Thanks,
--
kou

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
8e6374c0ef7b66942f34798e31edf014?d=identicon&s=25 Dobai-Pataky Balint (Guest)
on 2007-01-19 23:08
(Received via mailing list)
there is no sample yet:
text_cell = cr.create_pango_layout
text_cell.set_font_description(Pango::FontDescription.new("sans 12"))
text_cell.set_text('test')

i wanna set background for this pango layout, or something similar.
i wanted to place a pango rectangle there, to border the text, but it's
not supported.

i might place a cairo rectange, but found no docs for it.

so i thought at least i should change the background of the pango
layout.

thanks

balint
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2007-01-20 16:18
(Received via mailing list)
Hi,

In <45B140DD.1050307@gmail.com>
  "Re: [ruby-gnome2-devel-en] pango::layout background color" on Sat, 20
Jan 2007 00:06:21 +0200,
  Dobai-Pataky Balint <dpblnt@gmail.com> wrote:

> there is no sample yet:
> text_cell = cr.create_pango_layout
> text_cell.set_font_description(Pango::FontDescription.new("sans 12"))
> text_cell.set_text('test')

> i wanna set background for this pango layout, or something similar.
> i wanted to place a pango rectangle there, to border the text, but it's not
> supported.

x = ...
y = ...
w, h = text_cell.pixel_size
cr.rectangle(x, y, w, h)
cr.draw

Thanks,
--
kou

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2007-01-21 02:46
(Received via mailing list)
Hi,

In <20070121.001734.18809618.kou@cozmixng.org>
  "Re: [ruby-gnome2-devel-en] pango::layout background color" on Sun, 21
Jan 2007 00:17:34 +0900 (JST),
  Kouhei Sutou <kou@cozmixng.org> wrote:

> y = ...
> w, h = text_cell.pixel_size
> cr.rectangle(x, y, w, h)
> cr.draw

I found a typo.

> cr.draw

cr.stroke


Thanks,
--
kou

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
8e6374c0ef7b66942f34798e31edf014?d=identicon&s=25 Dobai-Pataky Bálint (Guest)
on 2007-01-24 16:44
(Received via mailing list)
Kouhei Sutou wrote:
>> y = ...
>> w, h = text_cell.pixel_size
>> cr.rectangle(x, y, w, h)
>> cr.draw
> cr.stroke
>
>

this works, draws a rectangle.
is there a way i can fill this rectangle with a color?

my first idea was to draw a bar with a light color.

Kou, can you please tell me where i can find the documentation for
rcairo?

thanks,

balint
0b039467c8c19aaef7d8f2a1b717435a?d=identicon&s=25 Mac Tuitui (Guest)
on 2007-01-24 16:54
(Received via mailing list)
Hi,

As far as I know, the documentation for rcairo is very light, however,
in the doc of ruby-gtk2, you have some samples that give a broad
aspect of rcairo. On my system, I have them under
/usr/share/doc/ruby-gtk2-0.14.1/sample/gtk-demo/cairo*

I hope that helps.

Alexis

PS: It seems I have two days' lag on my mailer, forgive me if I appear
late...

On 1/22/07, Dobai-Pataky Bálint <dpblnt@gmail.com> wrote:
> >> x = ...
>
> -------------------------------------------------------------------------
>
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
8e6374c0ef7b66942f34798e31edf014?d=identicon&s=25 Dobai-Pataky Bálint (Guest)
on 2007-01-24 20:30
(Received via mailing list)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
This topic is locked and can not be replied to.