> The text to render is set via the "value" property for svg.text.Text (acquired from svg.core.MTextContainer mixin). > I doesn't show up in the API docs for svg.text.Text, but it works.
The setValue and getValue methods are indeed the ones to use for text content. I'm not sure why you don't see them in the API viewer; I can see them in both release 0.2 and trunk. You need to look at the methods though, because it's not a property. > One other thing I found while getting started with svg.text.Text: it doesn't support any fill properties out of the box, > so I just created a subclass to mix in svg.paint.MFillProperties, which seemed to work OK for setting text colour. This is actually a design challenge that I face continuously. You will find many examples like this one in the contrib. The amount of available attributes for SVG elements is enormous. The Group element is a good example of it: it has almost no attributes of its own, but you can set almost every attribute in existence on it, which will be inherited by every element it contains. If I would include all available properties in the elements out of the box, the qooxdoo objects (and API) would become huge (near a hundred properties each, if not more). So I try to find a balance. Your solution of subclassing to include an extra mixin sounds like the perfect way to handle it. I do have plans to greatly extend the API to include a much larger part of the SVG standard. Currently I´m too pressed for time (I'm in the finishing stage of my studies), but I do want to start extending the contrib around September/October. My ultimate goal is to get close to supporting 100% of the elements, attributes and interfaces, so there will be a LOT more. There's a pretty clear inheritance tree in the SVG standard which I plan to mimic in the contrib. If you (or anyone else!) have any thoughts on how it should work, they would be most welcome. ;) > Set the "y" property of your text element to >=20. That property sets the text baseline, > so when it's =0, your text element is in the DOM but just out of view. Actually, SVG allows you to set the text baseline with the alignment-baseline, dominant-baseline, and a few other properties. See the W3 specification [1] for more info. The contrib doesnt provide an interface for these attributes (yet!), but you can set them with the normal setAttribute method that comes from qx.html.Element. Regards, Marc [1] http://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
