Chris' Cairo Blog

July 26, 2010

Visuals and Labels all in one

Filed under: What I am working on — thorgch @ 11:45 pm

I was putting together another animation overview when I realized that a large majority of the PNG images that make up the overview were also going to need a label. I could use a CairoPNGImageView and PangoMarkupLabelView and then group them into a transform group, but why not just make a new visual component that contains both? It’s just more convenient and it helps clean up the GUIPainter tree considerably, since I now have one tree icon instead of 3 (label, image and group).

The CairoLabeledVisualView will take any cairo based visual (e.g. PNG image or region) and apply a label to it. There are only a whopping 3 cairo based visual components at the moment, but I hope that will grow over time.

Here’s a screen shot of the component. The most involved configuration slice would be the Label Details slice. This slice lets the user configure the usual aspects of the label much like you would if you were just using the PangoMarkupLabelView. I also added some alignment details to help with quick alignment of the label.

That’s it for now. If you want to play around with this component, you’ll find it in the latest release of the CGK (7.7.11, cthorgrimsson).


July 13, 2010

Cairo Graphics Kit…Published!

Filed under: What I am working on — thorgch @ 8:15 pm

I have completed the porting of my Cairo Graphics Kit (or CGK for short) from VW7.4 to VW7.7 and have published it to the Cincom public StORE! I have also created some dedicated pages to provide more details on the CGK. On the right side of this blog is a Pages section where you can find some useful links about the kit if you decide to give it a try.

Here are a few key points to keep in mind about the kit:

  • It’s free to use and licensed under LGPL. 
  • I still consider this kit a “Work in Progress” (so please be kind).
  • A definitive method for getting the cairo and Pango binaries is still underway. 

These points and more are described here, so take a look and decide for yourself.

Create a free website or blog at