Performance 50ms

Asked by Raks A

I want to play SVG SMIL animation so I was looking to render some paths every 50ms to get a frame rate 20 frame per second. Is the library fast enough to render at such speeds,

Question information

Language:
English Edit question
Status:
Answered
For:
libsvg-android Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
pltxtra (pltxtra) said :
#1

In general the library itself is not the final decisive factor. It all
depends on the hardware you have available, resolution of the screen, and
complexity of the the SVG data you want to render.

However, libsvg-android does NOT in itself support scripting, SMIL,or any
animation of SVG. It merely renders static SVG images. This might change in
the future, if time permits.

   Regards
     Anton

On Fri, Jul 23, 2010 at 4:58 PM, Raks A <
<email address hidden>> wrote:

> New question #118723 on libsvg-android:
> https://answers.launchpad.net/libsvg-android/+question/118723
>
> I want to play SVG SMIL animation so I was looking to render some paths
> every 50ms to get a frame rate 20 frame per second. Is the library fast
> enough to render at such speeds,
>
> --
> You received this question notification because you are an answer
> contact for libsvg-android.
>

Revision history for this message
Raks A (rakssvg) said :
#2

So lets say I do the coding to create static SVG images every 50ms which can then be rendered by the libsvg-android library to give the animation effect, but can you let me know what is the sequence of things does this library do to do the actual rendering.

I assume that it converts it into a rgb buffer, what are the steps does it execute to convert it into a rgb buffer

Does it support filling of svg paths because that is what primarily a image consists of and is it anti-aliased ?

Regards
Raks

Revision history for this message
pltxtra (pltxtra) said :
#3

libsvg-android works like this:

create svg-object (select if you want to do antialiasing or not)
load svg file into object (create a string object that contains the SVG)
create a canvas object
render svg object using the canvas

So, if you create a canvas that outputs to a RGB bitmap you will get the
result in that bitmap, or you can do as in this example:

http://bazaar.launchpad.net/~pltxtra/libsvg-android/main/annotate/head:/src/com/toolkits/libsvgandroid/HelloSvgCanvas.java

<http://bazaar.launchpad.net/~pltxtra/libsvg-android/main/annotate/head:/src/com/toolkits/libsvgandroid/HelloSvgCanvas.java>However;
if you have a fixed amount of frames you can render to bitmaps first, and
then blit those bitmaps to your screen. This is probably faster than
rasterising the SVG files everytime.

    Best Regards
      Anton

On Sat, Jul 24, 2010 at 6:10 AM, Raks A <
<email address hidden>> wrote:

> Question #118723 on libsvg-android changed:
> https://answers.launchpad.net/libsvg-android/+question/118723
>
> Status: Answered => Open
>
> Raks A is still having a problem:
> So lets say I do the coding to create static SVG images every 50ms which
> can then be rendered by the libsvg-android library to give the animation
> effect, but can you let me know what is the sequence of things does this
> library do to do the actual rendering.
>
> I assume that it converts it into a rgb buffer, what are the steps does
> it execute to convert it into a rgb buffer
>
> Does it support filling of svg paths because that is what primarily a
> image consists of and is it anti-aliased ?
>
> Regards
> Raks
>
> --
> You received this question notification because you are an answer
> contact for libsvg-android.
>

Can you help with this problem?

Provide an answer of your own, or ask Raks A for more information if necessary.

To post a message you must log in.