On Tue, 2005-12-27 at 21:06 +0100, Dirk Meyer wrote:
> Maybe put svg support to kaa.imlib2? Yes, I know it has nothing to do
> with imlib2, but kaa.imlib2 is our image lib and kaa.thumb is based on
> that. So if you add svg support to kaa.imlib2, we can also generate
> thumbnails for svg files.

Maybe.  I can move the extension to kaa.imlib2 and just have kaa.canvas
use that directly, but it will still require extra code to get
kaa.imlib2 to read SVG files.  I'll think about that.

> engine on top of mevas (e.g. adding animations). But I don't see a
> reason why we need something high-level on top of kaa.canvas. So I
> would like to request some features to kaa.canvas Freevo needs right
> now:

Well, some things will still be layered on top of kaa.canvas. I don't
see the canvas turning into a widget set. :)

> o Text fading out. IIRC this is already done using imlib2

Right.  It's a terrible kludge, and it doesn't work for TextBlock
objects, but it does work.

> o Round rectangles. It looks nice to have round corders for
>   rectangles. I guess evas can't do it since not even imlib2 can. But
>   imlib2 supports rectangles and circles so based on imlib2 you can
>   add round rectangles support to kaa.canvas. Just use an imlib2 image
>   with round corders are requested.

Would it work to just use an image as a template (a white rectangle with
rounded corners) and scale that to the desired size?  With
Image.set_color you can make it any color, and with Image.set_border you
can define a border from the edges so that the corners won't get
distorted.

> o Shadows and borders. It is nice to have a shadow or a border around
>   texts and rectangles. Freevo does this by drawing on object more
>   than once in different colors. It would be nice if kaa.canvas could
>   do this, too.

Evas has a bunch of text effects, including shadow and outline, but
because we're using Imlib2 to render the text (to get the fade-on-clip
effect), we can't make use of them.

The only way to do this generically with the canvas is to have a copy of
every object you want shadowed.  I could simulate a shadow with Imlib2 I
suppose.  I'll think about that too.

> o Rotating images 90, 180 and 270 degrees.

Currently possible with Image.as_image().orientate() but I'll look at
adding these primitives (orientate, flip, mirror, etc.) as properties so
that will be a little more integrated.  (You could watch a movie
flipped, for example).  Rotate won't work, however, because that creates
a new image (since the dimensions might be different, it can't use the
same buffer). 

> complicated, adding animation support would kill it. So maybe we need
> to go back to make a skin file part xml and part python to have the
> full power of animation. And special classes for drawing menus and the
> other things to support animation where needed. And how should such an
> xml file look like?

I keep seeing something like inline Javascript, only python.  Consider
this fictional, high level example:

<theme name="foo">
   <screen class="main">
      <menu name="mainmenu" width="40%" height="70%" hcenter="50%"
            vcenter="50%" onselect="mainmenu_select" />

      <image right="90%" width="30%" top="10%" alpha="180" 
             name="watermark" />
   </screen>
   <script>
   <!--
      def mainmenu_select(screen, item_name, item_label):
         image = screen.find_object("watermark")
         image.set_image("watermark-%s.png" % item_name)
   -->
   </script>
    <script src="someotherscript.py" />
</theme>

Obviously something like the above is going to be really, really hard to
get right.  Or even good.  But that's the kind of thing I had in mind.

Jason.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to