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).
