On Tue, 2005-12-27 at 22:41 +0100, Dirk Meyer wrote: > Same with Freevo. For text blocks I have some special handling in > Freevo. You define width and height and Freevo does the line > breaking. If the text is too long, Freevo adds '...'. We only fade for > texts in one line (e.g. menu items with too much text)
I don't know if evas's textblock can do that (append ... if it's too long). It's probably possible to figure out how much of a string can fit visibly onto the textblock, and then just crop it at that point, appending "...". Right now only a very small part of evas's textblock API is wrapped. > I like to have the same x and y radius. If you scale the rectangle, it > would look different. But that's a small price, I could live with that > solution. No, it wouldn't. You misunderstand what set_border does. Say your radius is 10 pixels. You do Image.set_border(10, 10, 10, 10). This means that anything within a 10 pixel border around the image will not get scaled. The corners will remain intact (10x10 corners) and the edges will get copied, rather than scaled. So you could scale the image to any size and it will still look correct. See: http://sault.org/mebox/canvas/ In the Layout section, the screenshot that shows "Text inside a container." The frame image is actually much larger than what's displayed, and it's also square, whereas the image shown is rectangular. It's scaled, but the corners remain undistorted. What it does mean, though, is that you can't have variable sized rounded corners. Well, you could, but you'd need separate images for each size of corner you want. Probably not a big deal. > Too bad. BTW, you only need to use imlib2 when you need the fade out > effect. Yes, that's true, but there are some differences between how Imlib2 and Evas renders text (I think Evas specifies size in points, whereas Imlib2 is in pixels) and it's quirky. Something else for me to figure out. > But maybe there is a better way to add the fade out effect > than using imlib2. There's no way to get at the raw pixels of evas objects other than Image objects. I wish there was, because it would allow me to basically work around all of Evas's limitations myself. > Maybe it would be possible to define tags? Like Freevo registers > <listing> to kaa.canvas and the xml parser will call the Freevo code > when it gets to <listing>? Yes, this can be trivially added. It's on my personal TODO. Jason.
signature.asc
Description: This is a digitally signed message part