Chris' Cairo Blog

The Cairo Graphics Kit

Welcome. You have found the temporary home for the Cairo Graphics Kit (or CGK for short)

What is it?

  • It’s a free bundle licensed under LGPL for use in VisualWorks 7.7.
  • It’s a collection of packages that further enhance the CairoGraphics and Pango packages already provided by Cincom.
  • It’s a working example of what you can do with VisualWorks, cairo and Pango.

Where can you get it?

  • The Cincom public StORE repository. It’s published under the bundle name Cairo Graphics Kit.

What version should you use?

  • The current version is 7.7.19 cthorgrimsson.

Is there anything else I need?

Well, yes and no. If you are already playing with cairo and Pango in VisualWorks, then you have what you need when it comes to the required packages and libraries. You can skip this section. However, if this is your first time using cairo or Pango in VisualWorks then you’re going to need to get all the cairo and Pango binaries for your platform.

Here you have several options, each with their own set of frustrations. Travis Griggs at Cincom is working to improve this process, so hopefully things will get a lot simpler. For the time being however, you’re going to have to roll up your sleeves and dig in.

  • Option 1
    • You can try the pre-built binaries from the GTK+ Project page.
      • Technically, they should work??? I have not tried them.
      • Travis Griggs also had the following comment. “The problem with the one you can cherry pick out of GTK, is that it includes all of the freetype/fontconfig stuff, and I really don’t want that.”
  • Option 2 (the one I recommend for the moment)
    • You can build your own binaries. I know…that sounds really scary, but it’s not.
    • The source can also be found at the GTK+ Project page
    • Travis has put together a nice set of instructions on this process over at the main cairo site.
  • Option 3
    • You can contact me and I can provide the binaries I made.
      • thorgch(at)gmail_dot_com
      • replace the _dot_ with . and replace the (at) with @.
    • My binaries are not the latest version of either cairo or Pango but they do work with the current version of the CGK and the package versions of  CairoGraphics and Pango that I use.
    • I built my binaries before Travis documented the build process so I used a different approach. My binaries are only for Windows and require you to also install the VC++ runtime environment on your PC (a pain if you plan to redistribute your application).

The only other things the CGK needs is the CairoGraphics, Pango and UIPainter packages. You can also find them at the Cincom public StORE repository. If you don’t already have them, the CGK bundle will automatically pull them in during loading. Since CairoGraphics and Pango are also under continued development, my suggestion is to judge for yourself. In other words, look at the blessing level and the comments. When I started development back in October of 09, I started with the version (96 + ObjectiveCConnect) for CairoGraphics and (23, tgriggs) for Pango.

What is the current state of development?

  • Beta….the CGK is still baking.
  • What’s published to the Cincom public StORE is what I consider the 3rd generation of this kit. The second generation never saw the light of day.
  • The first generation of the kit is still in use within our software. It is regularly used in our labs and is in use at one customer site.
  • At present, I am working to move our main software product off the first generation of the kit and on to the third.

Can you contribute to this kit?

  • Yes! Yes! Yes! That would be awesome!!
  • We chose LGPL as our license because we want others to use this kit and hopefully contribute to its development if they want.
  • How? We’ll try the public StORE at first.

What else should I know about before I try the kit?

  • Check out the Comment tab in the package browser for the bundle and you’ll find additional information there.
    • In particular, you may want to check out the list of method overrides to make sure you don’t have any major objections. At the moment, it’s only a couple and I think their pretty innocuous.
  • You should also know that I have not used any of these components on a Mac or Linux machine. All the devlopment has been within VisualWorks for Windows. It would be nice to know if any other platform users get the CGK working, so let me know and I can update this bullet.

Where can I find more information on how to use the kit?

  • For the time being, any How-To guide can be found here on the blog. Just look under the Pages>>The Cairo Graphics Kit section over on the right.
  • It’s an on-going effort to document this kit, so check back from time to time.
  • If you have something that you would like to add to an article, use the comments functionality of that article.
Advertisements

1 Comment »

  1. Hi Chris,

    Nice job. I will be downloading the Cairo toolkit shortly. One question. Do you know of a way in Cincom smalltalk to retrieve the Windows Handle and Device context (MS Windows) of a widget – say a click widget or a image control that sits on a canvas? I have looked and looked with no luck. An example of what I am trying to do is:

    gc := (Examples.ExamplesBrowser prepareScratchWindowOfSize: 640@480) windowHandle.
    hdc := LibGDI32 primGetDC: gc.

    I would like to do the same thing for a click widget that sits on a CINCOM dialog (i.e. canvas)

    Just asking.

    Thanks
    Dennis

    Comment by Dennis McLeod — September 15, 2010 @ 7:56 am | Reply


RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: