Cairo graphics samples ported to Ruby/ RCairo

Hi Everyone,

Over the past couple of days, I ported the C samples from the Cairo website to Ruby using RCairo.

These are on my blog at: https://notepad.onghu.com/2021/cairo-samples-in-ruby/
All the code is available at: GitHub - mohits/rcairo_samples: RCairo port of sample code from the Cairographics website

Separately, I have a question about the last sample:
https://www.cairographics.org/samples/text_extents/

If you're using Cairo in Ruby, I'd love to hear from you.

If Kouhei is on the group, thanks for creating RCairo :slight_smile:

Thanks & Best Regards,
Mohit.

Hi,

In <543ddebb-861f-cd03-4d45-ce858f0bc669@onghu.com>
  "Cairo graphics samples ported to Ruby/ RCairo" on Sun, 30 May 2021 15:16:05 +0800,

Over the past couple of days, I ported the C samples from the Cairo
website to Ruby using RCairo.

These are on my blog at:
https://notepad.onghu.com/2021/cairo-samples-in-ruby/
All the code is available at: GitHub - mohits/rcairo_samples: RCairo port of sample code from the Cairographics website

Thanks!

Separately, I have a question about the last sample:
text extents

I think that this is just for showing values in
Cairo::TextExtents. So the original sample isn't wrong.

If Kouhei is on the group, thanks for creating RCairo :slight_smile:

I'm on here (and cairo@cairographics.org too).
I'm the current maintainer not the original author but
thanks. :slight_smile:

Thanks,

···

Mohit Sindhwani <mo_mail@onghu.com> wrote:
--
kou

Thanks Kouhei. I am now also creating a separate post for "porting" C code to Ruby/RCairo based on the experience of doing this one. I hope to publish that some time this week.

Best Regards,
Mohit.
2021-5-31 | 10:59 am.

···

On 2021-5-31 10:30 am, Sutou Kouhei wrote:

I think that this is just for showing values in
Cairo::TextExtents. So the original sample isn't wrong.

If Kouhei is on the group, thanks for creating RCairo :slight_smile:

I'm on here (and cairo@cairographics.org too).
I'm the current maintainer not the original author but
thanks. :slight_smile:

[Image]

                   打不开呢?blog是不是有问题?需要打开cookie? 邮件正文结束标识。

I'm sorry I can't see the image you posted to the group. Based on Google translate, I think you asked:
> Can't open it? Is there a problem with the blog? Need to open cookies?

There is no problem from where I can check and it seems to be OK. I can still connect from here.

Best Regards,
Mohit.

···

On 2021-5-31 4:34 pm, Chen Feng9609 (SOG CN) wrote:

Hi Everyone,

Further to the post below.

Over the past couple of days, I ported the C samples from the Cairo website to Ruby using RCairo.
These are on my blog at: https://notepad.onghu.com/2021/cairo-samples-in-ruby/
All the code is available at: GitHub - mohits/rcairo_samples: RCairo port of sample code from the Cairographics website

While porting from the C API to the Ruby/ RCairo API, I wrote a number of notes and have documented these notes in a new post.
https://notepad.onghu.com/2021/cairo-rcairo-porting/

I'm hopeful someone will find it useful.
As always, comments welcome.

Best Regards,
Mohit.

···

On 2021-5-30 3:16 pm, Mohit Sindhwani wrote:

[Image]

                  打不开呢?blog是不是有问题?需要打开cookie? 邮件正文结束标识。

···

________________________________
From: ruby-talk <ruby-talk-bounces@ruby-lang.org> on behalf of Mohit Sindhwani <mo_mail@onghu.com>
Sent: Monday, May 31, 2021 11:00:26 AM
To: Ruby users <ruby-talk@ruby-lang.org>; Sutou Kouhei <kou@cozmixng.org>
Subject: Re: Cairo graphics samples ported to Ruby/ RCairo

On 2021-5-31 10:30 am, Sutou Kouhei wrote:

I think that this is just for showing values in
Cairo::TextExtents. So the original sample isn't wrong.

If Kouhei is on the group, thanks for creating RCairo :slight_smile:

I'm on here (and cairo@cairographics.org too).
I'm the current maintainer not the original author but
thanks. :slight_smile:

Thanks Kouhei. I am now also creating a separate post for "porting" C
code to Ruby/RCairo based on the experience of doing this one. I hope to
publish that some time this week.

Best Regards,
Mohit.
2021-5-31 | 10:59 am.