Giter VIP home page Giter VIP logo

svg-android's People

Contributors

megamattron avatar pents90 avatar

Watchers

 avatar

svg-android's Issues

What are the exact settings for exporting from illustrator?

What steps will reproduce the problem?
1. save the image as an svg per the instructions I found on this site.


What is the expected output? What do you see instead?
I expect to see an the image.
The image is blank.
Im able to load the android sample I downloaded from this site but none of the 
svg files that i have exported work.

What version of the product are you using? On what operating system?
illustrator cs5

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 May 2012 at 12:43

svg file with rendered without words.

What steps will reproduce the problem?
1. take this svg file http://commons.wikimedia.org/wiki/File:Buc_metro_map.svg
2. Try rendering them with the library.
3. Observe incorrect results

What is the expected output? What do you see instead?
The image should be the same from the commons wikimedia file. Instead we have 
the image without the words that appear on it.

What version of the product are you using? On what operating system?
1.1 on Android 2.2

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Dec 2012 at 5:02

Attachments:

svg-android imageview not working

What steps will reproduce the problem?

1. Create an imageview
2. Attach it to RelativeLayout

Like so:
Implement an imageview like so:
ImageView imageView = new ImageView(this); 
SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.logo); 
imageView.setImageDrawable(svg.createPictureDrawable());
RelativeLayout home_header = (RelativeLayout) findViewById(R.id.home_header);
home_header.addView(imageView);

What is the expected output? What do you see instead?
Image displays

What version of the product are you using? On what operating system?
05-27 11:25:43.950: E/(28492): Can't open file for reading
05-27 11:25:43.960: E/(28492): Can't open file for reading
05-27 11:25:43.980: W/dalvikvm(28492): threadid=1: thread exiting with uncaught 
exception (group=0x40bd41f8)
05-27 11:25:43.980: E/AndroidRuntime(28492): FATAL EXCEPTION: main
05-27 11:25:43.980: E/AndroidRuntime(28492): 
java.lang.UnsupportedOperationException
05-27 11:25:43.980: E/AndroidRuntime(28492):    at 
android.view.GLES20Canvas.drawPicture(GLES20Canvas.java:911)
05-27 11:25:43.980: E/AndroidRuntime(28492):    at 
android.graphics.drawable.PictureDrawable.draw(PictureDrawable.java:73)

Please provide any additional information below.
What am i missing?!


Original issue reported on code.google.com by [email protected] on 27 May 2013 at 6:57

SVG conversion failed (?)

What steps will reproduce the problem?
1. Import a SVG image (drawn with inkscape)using the svg-android as described 
in the tutorial: http://code.google.com/p/svg-android/wiki/Tutorial
2. Draw it on the screen

What is the expected output? What do you see instead?
Expected output: The image has been drawn
What I see instead: nothing - only the action bar!

What version of the product are you using? On what operating system?
svg-android: 1.1
android: v.3.2 (on a tablet)
         v.4.1 (on an emulator)
Please provide any additional information below.
I tried to draw the image with the Canvas and tge ImageView both.

Attached: source code

Original issue reported on code.google.com by [email protected] on 23 Jul 2012 at 3:54

Attachments:

Gradient xlink issue patch

Gradient being build improperly if it refers another gradient element that was 
not yet defined.

As a solution gradient building was moved to final stage (to closing </svn> tag 
"event").


Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 3:50

Attachments:

Mavenised fork + most patches + new changes available

If anyone's interested, I've gone around collecting all the various patches and 
forks of this awesome library, added my own changes, tested with around 200 
SVGs and have published my own fork.

If the original author decides to take this project on again I will cease 
maintaining my fork.

Until then, if anyone's interested, you'll find my fork on Maven central so you 
can just punch in a few details into your Maven/sbt/gradle/ant+ivy script to 
get the most recent version.

https://github.com/japgolly/svg-android

Thanks. Hope you enjoy.
David

Original issue reported on code.google.com by [email protected] on 31 Jan 2013 at 1:29

Implicity Line commands in Paths aren't handled

What steps will reproduce the problem?
1. http://www.w3.org/TR/SVGTiny12/paths.html (8.3.2) says "If a 'moveto' is 
followed by multiple pairs of coordinates, the subsequent pairs shall be 
treated as implicit 'lineto' commands."

2. using the test case:
<?xml version="1.0"?>
<svg width="400" height="400" viewBox="0 0 400 400" 
xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
  <path d="M 100,100 300,100 200,300 z"
        fill="#ff0000" stroke="#0000ff" stroke-width="3" />
</svg>

What is the expected output? What do you see instead?
Expect to see a red triangle with a blue border, but instead there is no image 
at all.

What version of the product are you using? On what operating system?
latest from svn

Please provide any additional information below.
I'm using Inkscape, converting to SVG tiny, and its output doesn't match the 
format of Illustrator (although it creates valid Paths).


Original issue reported on code.google.com by [email protected] on 16 May 2011 at 6:19

Linear gradient ignores opacity

What steps will reproduce the problem?

This ellipse has 50% opacity and a linear gradient applied to the fill.  The 
transparency should be applied to the gradient, as it does in Illustrator, 
Batik, Firefox, etc.  However in svg android the gradient ignores the opacity 
tag.

-----------------------------
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="214.2998" 
y1="209.4316" x2="292.04" y2="209.4316" xlink:type="simple" xlink:show="other" 
xlink:actuate="onLoad">
        <stop offset="0.2873" style="stop-color:#FFFFFF" />
        <stop offset="1" style="stop-color:#000000" />
    </linearGradient>

        <ellipse opacity="0.5" fill="url(#SVGID_1_)" stroke="#000000" stroke-miterlimit="10" cx="253.17" cy="209.432" rx="38.87" ry="29.654" />
---------------------------------


What version of the product are you using? On what operating system?
svg android 1.1 on android 2.3.3

Original issue reported on code.google.com by [email protected] on 4 Oct 2012 at 5:22

Scale issue, Is it possible to specify size of the rendered picture?

Firstly, thanks your guy for sharing such a great project.

After go through the code, I found there is no way to scale the output picture, 
and the following code

        SVG svg = SVGParser.getSVGFromInputStream(inputStream);

        PictureDrawable drawable = svg.createPictureDrawable();

    drawable.setBounds(0, 0, newWidth, newHeight);

is only affect 

<svg version="1.1" baseProfile="basic" x="0px" y="0px" width="374px" 
height="367.723px"
     viewBox="0 0 374 367.723" xml:space="preserve">

but the shape is not scaled.



Original issue reported on code.google.com by [email protected] on 5 Jun 2011 at 5:03

whitespace handling bug in ParserHelper.parseFloat()

What steps will reproduce the problem?
1. use the following simple example taken (and simplified) from here: 
http://www.w3.org/TR/SVGTiny12/paths.html#PathData

<?xml version="1.0"?>
<svg width="400" height="400" viewBox="0 0 400 400" 
xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
  <path d="M 100 100 L 300 100 L 200 300 z"
        fill="#ff0000" stroke="#0000ff" stroke-width="3" />
</svg>

2. the spaces in the path data cause NaNs when parsing the X values.

What version of the product are you using? On what operating system?
Latest from svn


Please provide any additional information below.
A snippet of the ParserHelper.parseFloat() method is below, with a line added 
to ignore space chars (the line marked // fix)

    public float parseFloat() {
        int     mant     = 0;
        int     mantDig  = 0;
        boolean mantPos  = true;
        boolean mantRead = false;

        int     exp      = 0;
        int     expDig   = 0;
        int     expAdj   = 0;
        boolean expPos   = true;

        switch (current) {
        case '-':
            mantPos = false;
            // fallthrough
        case '+':
            current = read();
            break;
        case ' ': current = read(); // fix
        }

Original issue reported on code.google.com by [email protected] on 15 May 2011 at 10:25

Not working on 4.2.2

What steps will reproduce the problem?
1. Trying to show svg image on android 4.2.2

What is the expected output? What do you see instead?
I see image on older androids, but not on 4.2.2


Original issue reported on code.google.com by [email protected] on 11 Mar 2013 at 3:08

Inkscape Plain SVG with gradient causes force close

What steps will reproduce the problem?
1. Create a simple object with a gradient in Inkscape.
2. Create a simple object with a solid fill on the same layer.
3. Save it as SVG Plain.
4. Import the file into the res/raw folder of the tutorial project.
5. Run to see a black activity view and then a force close message.
6. Edit the SVG file in a text editor and remove the defs tag with the gradient 
declaration and the offending simple object associated with the gradient.
7. Run again to see a white activity view with the solid fill object rendered 
A-OK.

What is the expected output? What do you see instead?
I'm not sure how Inkscape creates their gradients tag-wise, but I would expect 
that a simple gradient would work (the sample images indicate that gradients 
work). Instead the app force closes after a brief view of a black activity view 
/ screen.

What version of the product are you using? On what operating system?
I am using svg-android 1.1 and Android 2.3.5 on a T-Mobile Samsung Galaxy S 2. 
I am using Android API level 10 (2.3.3) for development.

Please provide any additional information below.
Would it be possible to provide the svg files for the sample images for 
comparison? I'd like to troubleshoot which tags are causing all this trouble.

The attached square.svg image will cause the issue, removing the defs tag and 
the two rectangles with gradients will resolve the issue.

Original issue reported on code.google.com by [email protected] on 8 Dec 2011 at 3:42

Attachments:

SImple output generated from SVG Pony does not render

What steps will reproduce the problem?

1. Used Linkscape to implement the classic Swedish flag
2. Used SVG Pony to migrate "Full On" SVG to SVG Tiny
3. Both IE and Google Chrome render output in 2 as expected
4. The code below renders the android.svg supplied by yourself, no problem, but 
fails to render the output from (2), as given below.

Here is the SVG :

--------------------------------------

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200" 
baseProfile="tiny" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" 
viewBox="0 0 320 200">
<g id="layer1" transform="translate(0,-852.36218)">
  <rect id="rect3761" transform="translate(0,852.36218)" height="200" 
width="320" y="0" x="0" fill="#005a7b"/>
  <path id="rect3763" transform="translate(0,852.36218)" fill="#ffc200" 
d="m80,0v80h-80v40h80v80h40v-80h200v-40h-200v-80h-40z"/>
</g>
</svg>

--------------------------------------

Here is the code (resource sweden_2 is the above svg) :

--------------------------------------

package examples.pma.svg;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;

import com.larvalabs.svgandroid.SVG;
import com.larvalabs.svgandroid.SVGParser;

public class SVGActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate (Bundle savedInstanceState)
    {
        super.onCreate (savedInstanceState);

        setContentView (R.layout.main);

        ImageView i = (ImageView) findViewById (R.id.imageView1);

        //i.setImageResource (R.raw.sweden_2);

        SVG svg = SVGParser.getSVGFromResource (getResources (), R.raw.android);

        i.setImageDrawable (svg.createPictureDrawable ());
    }
}

--------------------------------------

What is the expected output? What do you see instead?

   Expected : Classic Swedish Flag (Blue background with yellow cross)

   See : No image rendered

What version of the product are you using? On what operating system?

   Android Emulator, on WIndows 7, emulating SDK ANdroid 2.2,    launched from within Eclipse

Please provide any additional information below.

The Java code renders

   Nothing is rendered, just a black background in the image view.


Original issue reported on code.google.com by [email protected] on 11 Feb 2012 at 5:52

float values support scientific format

What steps will reproduce the problem?
1. add linearGradient element like the one below:
     <linearGradient
       id="linearGradient3737"
       gradientUnits="userSpaceOnUse"
       gradientTransform="matrix(0.0748444,0,0,9.76563e-4,558.45,312.3)"
       spreadMethod="pad"
       x1="-819.20001"
       y1="0"
       x2="819.20001"
       y2="0"><stop
         offset="0"
         style="stop-color:#FFFFFF;stop-opacity:1"
         id="stop3739" /><stop
         offset="1"
         style="stop-color:#FFFFFF;stop-opacity:0.196078"
         id="stop3741" /></linearGradient>


What is the expected output? What do you see instead?

It should be parsed without exceptions

What version of the product are you using? On what operating system?

1.1

Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 1:11

Load the SVG on the size wanted

What steps will reproduce the problem?
1.Load a SVG dont have the option for resize 

What is the expected output? What do you see instead?
Sizes of  Pictures what you like

What version of the product are you using? On what operating system?
The last version 

Please provide any additional information below.
I provide you the function who i make it for do this;
this function must be in SVG.class
and when you like load make this steps;

svg = SVGParser.getSVGFromResource(getResources(), R.raw.bolsa);
Picture=svg.resizePicture(height);//I only send one parameter for mantaining 
the scale

---
FUNCTION ON SVG.class

---
public Picture resizePicture(int height){
        int width=(int) ((height*limits.right)/limits.bottom);
        Picture newPicture = new Picture();
        Canvas canvas;
        Bitmap bitmap=Bitmap.createBitmap((int)limits.right,(int) limits.bottom, Bitmap.Config.ARGB_4444);
        canvas = new Canvas(bitmap);
        canvas.drawPicture(picture);
        bitmap=Bitmap.createScaledBitmap(bitmap, width, height, true);
        canvas=newPicture.beginRecording(width, height);
        canvas.drawBitmap(bitmap, 0,0, null);
        newPicture.endRecording();
        bitmap=null;
        limits.right=width;
        limits.bottom=height;
        return newPicture;
    }

Original issue reported on code.google.com by [email protected] on 25 Apr 2012 at 2:20

setAlpha not working or not showing up

What steps will reproduce the problem?
1. draw a svg as picturedrawable
2. change this picturedrawable's alpha through setAlpha


What is the expected output? What do you see instead?
the image should become more/less transparent, but it doesn't.

What version of the product are you using? On what operating system?
svg-android 1.1- android 2.3.4/android 2.1




Original issue reported on code.google.com by [email protected] on 5 Jul 2011 at 11:01

SVG attributes not working as they should

I've been using your library to display the following SVG:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version = "1.1"
     baseProfile="full"
     xmlns = "http://www.w3.org/2000/svg" 
     xmlns:xlink = "http://www.w3.org/1999/xlink"
     xmlns:ev = "http://www.w3.org/2001/xml-events"
     height = "400px"  width = "400px">
     <rect x="0" y="0" width="400" height="400" 
          fill="none" stroke="black" stroke-width="5px" stroke-opacity="0.5"/>
     <g fill-opacity="0.6" stroke="black" stroke-width="0.5px">
        <circle cx="200px" cy="200px" r="104px" fill="red"   transform="translate(  0,-52)" />
        <circle cx="200px" cy="200px" r="104px" fill="blue"  transform="translate( 60, 52)" />
        <circle cx="200px" cy="200px" r="104px" fill="green" transform="translate(-60, 52)" />
     </g>
</svg>

Unfortunately, it was not showing, further investigation shown that it 
improperly parses the fill argument for circles and stroke-opacity.


Original issue reported on code.google.com by [email protected] on 21 Dec 2011 at 8:13

SVG picture is rendered differently from inkscape

What steps will reproduce the problem?
1. load care.svg into inkscape and have a look
2. try to launch the application SVGTest that uses svg-android (got from 
https://github.com/mrn/svg-android.git)
3. the two pictures look different

What is the expected output? What do you see instead?
more or less same output

What version of the product are you using? On what operating system?
android 3.2



Original issue reported on code.google.com by [email protected] on 31 Oct 2012 at 2:10

Attachments:

Corel svg and Inkscape svg are not correct parsed

What steps will reproduce the problem?
1. Creating a svg map in CorelDraw
2. Using your library as in examples
3. Repeting the same with Inkscape

What is the expected output? What do you see instead?
The map. 
For Corel an error for using in
For Inkscape some very small objects


What version of the product are you using? On what operating system?
1.1 of your library. Android 2.2

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 5 Feb 2013 at 2:55

Attachments:

Support for Android 3, 4 Hardware Acceleration

What steps will reproduce the problem?
 Not supported with Hardware Acceleration!
 Android 3,4

http://groups.google.com/group/android-platform/browse_thread/thread/f3df89612fb
bcec4?pli=1

Original issue reported on code.google.com by [email protected] on 29 Feb 2012 at 9:28

TIP: check your SVG header!

Not much of a problem concerning svg-android code but I do want to warn you as 
I have been coding a workaround for 2 hours to solve this problem only to find 
out just then that the problem was inside my SVG header.

My SVG showed up a lot smaller than it should and also on a weird position, 
even though the SVG had a bounds layer which was parsed correctly by 
svg-android. Turns out the SVG header had wrong height and width values (higher 
than my bounds values) in it, causing the main content to scale down to fit the 
whole thing. The artwork was exported to SVG 1.1 using Illustrator CS5.1

Anyway, just make sure the header width and height values match your bounds 
layer rect width and height values and you'll be fine.

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
     width="154px" height="61px" viewBox="0 0 595.28 841.89" enable-background="new 0 0 595.28 841.89" xml:space="preserve">
<g id="bounds">
    <rect fill="#FFC91F" width="154" height="61"/>
</g>

Original issue reported on code.google.com by [email protected] on 18 Nov 2011 at 12:03

Incomplete attribute units support leads to NumberFormatException

What steps will reproduce the problem?
1. Create an SVG file in GIMP, which by default uses inches for width and 
height attributes of SVG.
2. Try to load the file using the library.
3. You'll get a stack with exceptions, something like this:

04-29 23:17:22.189: E/AndroidRuntime(331): java.lang.RuntimeException: Unable 
to start activity 
ComponentInfo{com.example.graphics.svg/com.example.graphics.svg.SVGTestActivity}
: com.larvalabs.svgandroid.SVGParseException: java.lang.NumberFormatException
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.os.Handler.dispatchMessage(Handler.java:99)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.os.Looper.loop(Looper.java:123)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread.main(ActivityThread.java:3683)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
java.lang.reflect.Method.invokeNative(Native Method)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
java.lang.reflect.Method.invoke(Method.java:507)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
dalvik.system.NativeStart.main(Native Method)
04-29 23:17:22.189: E/AndroidRuntime(331): Caused by: 
com.larvalabs.svgandroid.SVGParseException: java.lang.NumberFormatException
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser.parse(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser.getSVGFromResource(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.example.graphics.svg.SVGTestActivity.onCreate(SVGTestActivity.java:22)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-29 23:17:22.189: E/AndroidRuntime(331):  ... 11 more
04-29 23:17:22.189: E/AndroidRuntime(331): Caused by: 
java.lang.NumberFormatException
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.luni.util.FloatingPointParser.parseFltImpl(Native Method)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.
java:321)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
java.lang.Float.parseFloat(Float.java:323)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser.getFloatAttr(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser.getFloatAttr(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser.access$700(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
com.larvalabs.svgandroid.SVGParser$SVGHandler.startElement(Unknown Source)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:145)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatParser.appendBytes(Native Method)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:518)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:479)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318)
04-29 23:17:22.189: E/AndroidRuntime(331):  at 
org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275)
04-29 23:17:22.189: E/AndroidRuntime(331):  ... 16 more


What is the expected output? What do you see instead?
The SVG-file should be displayed.

What version of the product are you using? On what operating system?
The latest 1.1.

Please provide any additional information below.
The problem is in line 601 of SVGParser which processes only "px" suffix of 
attributes, whereas a file may contain "in" as well. Currently, if an attribute 
is specified as, for example, "200in", the library passes the value as is for 
float parsing, which is incorrect float, of course.

Original issue reported on code.google.com by [email protected] on 29 Apr 2012 at 7:29

Opacity doesn't work in path objects

What steps will reproduce the problem?
1. Try to render this:
<svg width="176px" height="208px">
<path opacity="0.5" d="M0,0v67.696h176V0H0z 
M43.925,42.753c-6.324,0-11.451-4.924-11.451-10.998
    c0-6.074,5.127-10.998,11.451-10.998s11.451,4.924,11.451,10.998C55.376,37.829,50.25,42.753,43.925,42.753z"/>
</svg>


What is the expected output? What do you see instead?
expected:A black rectangle with 50% opacity with a fully opaque oval
actual: the rectangle is fully opaque (no transparency at all)

What version of the product are you using? On what operating system?
most recent

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Oct 2011 at 4:16

Text-Support

Hello,

I see this correctly, that this library unfortunately does not supports text?
Will this function be added in the near future?
otherwise great library! :)

Sebastian

Original issue reported on code.google.com by [email protected] on 15 Aug 2011 at 6:05

Long delay in getting patches accepted

What steps will reproduce the problem?
1. Submit a patch/bug fix
2. Wait


What is the expected output?
  Some sort of response from the project owners 
What do you see instead?


Please provide any additional information below.

I've made the patches for issue #8 available at:
  http://code.google.com/p/svg-android-2/
pending resolution of this issue




Original issue reported on code.google.com by [email protected] on 31 Aug 2011 at 11:40

Very Slow Loading

What steps will reproduce the problem?
1. Load an SVG file
2. Put time stamps around SVGParser.getSVGFrom*(...)
3. Run app

What is the expected output? What do you see instead?
The SVGs load correctly, but it can take up to a minute to parse them on some 
phones.

What version of the product are you using? On what operating system?
SVGParser 1.1 on HTC Wildfire (2.2.1) and Samsung gt-i5700 (2.1).

Please provide any additional information below.
Loads very quickly on my S3, but on a lot of older devices (Archos, Desire, 
i5700, wildfire) it can take between 20 and 40 seconds to load a single SVG.  
The SVG is fairly complex, a whole set of 52 cards including picture cards.  
Less complex SVGs load a lot quicker.
This has lead to load time of almost 2 minutes for a simple Klondike Solitaire 
game.

Original issue reported on code.google.com by [email protected] on 4 Dec 2012 at 10:54

jellybean with graphics acceleration doesn't render

What steps will reproduce the problem?
1. try to render on jellybean with graphics acceleration

What is the expected output? What do you see instead?
none of the svg images display at all

What version of the product are you using? On what operating system?
jellybean, tried on a phone and nexus tab



Original issue reported on code.google.com by [email protected] on 27 Jul 2012 at 6:17

UNRECOGNIZED SVG COMMAND

I downloaded the last lib version of svg-android (jar)

I create a simple svg with inkscape (on ubuntu 12.04)

here is the output( i draw the content of the loaded drawable on a canavas, 
nothing shows up

D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: namedview
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: metadata
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: RDF
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: Work
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: format
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: type
D/SVGAndroid(  532): UNRECOGNIZED SVG COMMAND: title

if i add some text in the svg and convert it to real text("convert to text" in 
inkscape

then i also have unknown svg command : text

check the file as attachement , could not be simpler svg (created with simple 
shapes in a few seconds then saved to drawing.svg as a test)

it display ok with baltik library on my desktop java application
and in ubuntu with the image viewer

Original issue reported on code.google.com by pfl%[email protected] on 8 Oct 2012 at 7:37

Attachments:

Patch for SVG enhancements

Inkscape generates SVG output that is not processed properly by the library.
I have enhanced SVGParser.java to handle the following cases - If you are 
interested, I'm happy to (attempt to) send you the patch(es), or work with you
to get these features supported in the library
 - support transforms in <g> tags
 - support transform lists (e.g. transform="rotate(..) scale(..) ...")
 - support for arcs in paths
 - support implied commands in paths
 - limited support for text (e.g no tspan, but fill, stroke, transforms, etc
   seem to work OK

Original issue reported on code.google.com by [email protected] on 23 Jun 2011 at 7:51

getting UNRECOGNIZED SVG COMMAND at runtime

What steps will reproduce the problem?
1. Take an ImageView with both height and width as FILL_PARENT in layout.
2. Include the SVG jar file.
3. Set the Drawable object for ImageView as told in the homepage.

What is the expected output? What do you see instead?
I should see the vector image but instead I see only about 5% of the image with 
the above mentioned error.

What version of the product are you using? On what operating system?
Android 2.3.1 with eclipse indigo on windows xp.

Please provide any additional information below.

Used the attatched svg file


Original issue reported on code.google.com by [email protected] on 19 Dec 2011 at 6:25

Attachments:

To overlay two svg image and render it on screen

What steps will reproduce the problem?
I want to overlay two or more  svg elements and display it on screen .


What is the expected output? What do you see instead?
Could render only one svg element .

What version of the product are you using? On what operating system?
JB 4.1.2 


Please provide any additional information below.
Using Imageview view i could render one svg element .
Please let me know how to overlay two or more svg elements on to the scr
een .Can i use imageview for the same or do i need to use some other method .

Original issue reported on code.google.com by [email protected] on 28 May 2013 at 5:15

Reviewed and cleaned svg-android-2 patchset

I have refined the svg-android-2 patchset originally contributed to this 
project by issue 8, with extensive review and testing to provide reasonable 
assurance that nothing regresses.

The refinements specifically were:

  # Rejected the questionable <use> tag support that was added in svg-android-2.  This change introduced significant performance regressions by requiring a two-pass parse of the SVG document.
  # Corrected unintended (?) whitespace/formatting changes to make applying the patches easier to swallow.

Attached is a tarball of git format-patch over the new changeset.  They can be 
applied with git am if using git-svn, or simply by looping through each file 
and using patch -p1 < foo.patch (however the latter approach loses meta data 
which I worked hard to preserve *grin*).

Note that patch 5 is missing from the set which removes R.java from version 
control and updates to the latest Android build tools.  Obviously I would 
encourage the upstream maintainers to do the same but I don't think it belongs 
in this patchset.

Original issue reported on code.google.com by [email protected] on 13 Jul 2012 at 8:08

Attachments:

Standard color names are not supported

What steps will reproduce the problem?
1. Create a SVG in GIMP, which uses standard color names, such as "black".
2. Open the file using the library.
3. Paths with literal colors are not displayed.

What is the expected output? What do you see instead?
Paths with colors specified as literals should be displayed in appropriate 
colors.

What version of the product are you using? On what operating system?
The latest 1.1.

Please provide any additional information below.
Example of a path with literal color: <path id="pid" fill="none" stroke="black" 
stroke-width="3" ...

Original issue reported on code.google.com by [email protected] on 29 Apr 2012 at 7:45

java.lang.NumberFormatException

What steps will reproduce the problem?
Parse the attached file.

What is the expected output? What do you see instead?
Instead of SVG object I got the following exception:
java.lang.NumberFormatException: 5.000000e
at 
org.apache.harmony.luni.util.FloatingPointParser.initialParse(FloatingPointParse
r.java:116)
at 
org.apache.harmony.luni.util.FloatingPointParser.parseFloat(FloatingPointParser.
java:310)
at java.lang.Float.parseFloat(Float.java:327)
at com.larvalabs.svgandroid.SVGParser.parseNumbers(Unknown Source)
at com.larvalabs.svgandroid.SVGParser.parseTransform(Unknown Source)
at com.larvalabs.svgandroid.SVGParser.access$600(Unknown Source)
at com.larvalabs.svgandroid.SVGParser$SVGHandler.doGradient(Unknown Source)
at com.larvalabs.svgandroid.SVGParser$SVGHandler.startElement(Unknown Source)
at org.apache.harmony.xml.ExpatParser.startElement(ExpatParser.java:145)
at org.apache.harmony.xml.ExpatParser.append(Native Method)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:506)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:467)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:329)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:286)
... 15 more


What version of the product are you using? On what operating system?
1.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 18 May 2011 at 8:29

Attachments:

Unable to display image on htc one S

Execute the demo tutorial (http://code.google.com/p/svg-android/wiki/Tutorial) 
on HTC One S to produce the error. The device is having Android version 4.0.3

I received the the following error on logcat:-

02-18 12:49:09.485: E/AndroidRuntime(11693): FATAL EXCEPTION: main
02-18 12:49:09.485: E/AndroidRuntime(11693): 
java.lang.UnsupportedOperationException
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.GLES20Canvas.drawPicture(GLES20Canvas.java:922)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.graphics.drawable.PictureDrawable.draw(PictureDrawable.java:73)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.widget.ImageView.onDraw(ImageView.java:973)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.draw(View.java:11014)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.getDisplayList(View.java:10444)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.drawChild(ViewGroup.java:3149)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2788)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.getDisplayList(View.java:10442)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.drawChild(ViewGroup.java:3149)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2788)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.getDisplayList(View.java:10442)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.drawChild(ViewGroup.java:3149)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewGroup.dispatchDraw(ViewGroup.java:2788)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.draw(View.java:11017)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.widget.FrameLayout.draw(FrameLayout.java:450)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:217
5)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.View.getDisplayList(View.java:10444)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:883)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewRootImpl.draw(ViewRootImpl.java:2118)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1810)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2695)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.os.Handler.dispatchMessage(Handler.java:99)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.os.Looper.loop(Looper.java:156)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
android.app.ActivityThread.main(ActivityThread.java:4987)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
java.lang.reflect.Method.invokeNative(Native Method)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
java.lang.reflect.Method.invoke(Method.java:511)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-18 12:49:09.485: E/AndroidRuntime(11693):    at 
dalvik.system.NativeStart.main(Native Method)

Original issue reported on code.google.com by [email protected] on 18 Feb 2013 at 7:20

3-digit hex colours are not recognised

What steps will reproduce the problem?

Use a 3-digit hexadecimal colour specifier in the stroke parameter, e.g.
<line x1="10" y1="20" x2="50" y2="20" style="stroke: #f00; stroke-width: 5;"/>


What is the expected output? What do you see instead?

Expected output: #xyz is interpreted as #rgb, i.e., #f00 yields bright red.
Actual output: #xyz is interpreted as a suffix of #uvwxyz, i.e., #f00 yields a 
very dim green #000f00.


What version of the product are you using? On what operating system?

svg-android-1.1.jar in Android SDK 2.3.3 (API 10), java 1.6.0_22 on linux 
2.6.42.9-2


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 26 May 2012 at 7:37

Improper rendering of simple SVG files.

What steps will reproduce the problem?
1. Download chess pieces from http://en.wikipedia.org/wiki/Chess_piece
2. Try rendering them with the library.
3. Observe incorrect results

What is the expected output? What do you see instead?
The pieces should look like they do on the wikipedia page above. Instead, there 
are medium to major problems, like missing eyes on knights, missing 
dots/circles on bishops and queen, and missing outline of white king.

What version of the product are you using? On what operating system?
1.1 on Android 2.2

Please provide any additional information below.
Attached screenshot demonstrating the problem.

Original issue reported on code.google.com by [email protected] on 20 May 2011 at 8:05

Attachments:

Does not support "clipPath" or "use" SVG elements

What steps will reproduce the problem?
1. Attempt to parse an SVG document that contains one or more "clipPath" 
elements or "use" elements.

What is the expected output? What do you see instead?

Expected output: Parsed SVG resource
Actual output: Log entry that reads "UNRECOGNIZED SVG COMMAND: clipPath" 
(generated from startElement() in the SVGHandler class); similarly for "use"

What version of the product are you using? On what operating system?

v1.1 on Android 2.2.

Please provide any additional information below.

It'd be very helpful if the library could someday add support for document 
elements such as these two (and, obviously, any others that are not currently 
supported as well).

For reference, the W3C documentation: 
http://www.w3.org/TR/SVG/masking.html#EstablishingANewClippingPath
http://www.w3.org/TR/SVG/struct.html#UseElement

Original issue reported on code.google.com by [email protected] on 5 Sep 2012 at 11:27

linearGradient xlink:href fails if referenced element is defined later in svg file.

What steps will reproduce the problem?
1. Make a complex scene with inscape
2. Try to parse this block: (take a look at "LinearGradID_2-5" )
<linearGradient
     id="LinearGradID_22"
     gradientUnits="userSpaceOnUse"
     gradientTransform="matrix(-0.0549316,0,0,0.0012207,115.05,268.2)"
     spreadMethod="pad"
     x1="-819.20001"
     y1="0"
     x2="819.20001"
     y2="0"><stop
       offset="0"
       style="stop-color:#FFFFFF;stop-opacity:1"
       id="stop143" /><stop
       offset="1"
       style="stop-color:#FFFFFF;stop-opacity:0.196078"
       id="stop145" /></linearGradient><linearGradient
     inkscape:collect="always"
     xlink:href="#LinearGradID_2-5"
     id="linearGradient4177-7"
     gradientUnits="userSpaceOnUse"
     gradientTransform="matrix(-0.0989075,0.153412,-0.0591583,-0.038147,0,-23.5)"
     spreadMethod="pad"
     x1="-819.20001"
     y1="0"
     x2="819.20001"
     y2="0" /><linearGradient
     y2="0"
     x2="819.20001"
     y1="0"
     x1="-819.20001"
     spreadMethod="pad"
     gradientTransform="matrix(-0.0989075,0.153412,-0.0591583,-0.038147,0,-23.5)"
     gradientUnits="userSpaceOnUse"
     id="LinearGradID_2-5"><stop
       id="stop3441-6"
       style="stop-color:#CCCCFF;stop-opacity:1"
       offset="0" /><stop
       id="stop3443-8"
       style="stop-color:#333333;stop-opacity:1"
       offset="1" /></linearGradient><linearGradient
     inkscape:collect="always"
     xlink:href="#LinearGradID_3-0"
     id="linearGradient4179-6"
     gradientUnits="userSpaceOnUse"
     gradientTransform="matrix(-0.10505333,0.18195816,-0.07017003,-0.04051307,238.06352,220.86367)"
     spreadMethod="pad"
     x1="-819.20001"
     y1="0"
     x2="819.20001"
     y2="0" />

What is the expected output? What do you see instead?
child element should be moved to a wait list if parent was not defined. 

What version of the product are you using? On what operating system?
1.1
operating system: windows 7

Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 1:20

Gradient xlink issue patch

Gradient being build improperly if it refers another gradient element that was 
not yet defined.

As a solution gradient building was moved to final stage (to closing </svn> tag 
"event").


Original issue reported on code.google.com by [email protected] on 5 Apr 2012 at 3:50

Attachments:

Error in bounds calculation in SVGHandler.startElement

What steps will reproduce the problem?
1. using a bounds layer where the width is not equal to the height

What version of the product are you using? On what operating system?
r44 of SVGParser.java

Please provide any additional information below.
            if (boundsMode) {
                if (localName.equals("rect")) {
                    Float x = getFloatAttr("x", atts);
                    if (x == null) {
                        x = 0f;
                    }
                    Float y = getFloatAttr("y", atts);
                    if (y == null) {
                        y = 0f;
                    }
                    Float width = getFloatAttr("width", atts);
                    Float height = getFloatAttr("height", atts);
                    bounds = new RectF(x, y, x + width, y + width);
                }
                return;
            }

as you can see in the line bounds = new RectF(x, y, x + width, y + width), the 
width is being added to y instead of height.

it should be bounds = new RectF(x, y, x + width, y + height);

Original issue reported on code.google.com by [email protected] on 10 Aug 2011 at 6:45

Can't play svg with animations

Use the file on the SVG Animations article:

http://upload.wikimedia.org/wikipedia/commons/4/4f/Soccer_ball_animated.svg

android-svg crashes when trying to render that file.

Original issue reported on code.google.com by [email protected] on 21 Oct 2011 at 5:34

use svg for libgdx project

hi, all.
who can tell me how to use svg for libgdx project?
SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.android);
how can i getResources() in libgdx project();
thanhs.

Original issue reported on code.google.com by [email protected] on 8 Jul 2012 at 3:15

Forgot to commit changed files?

Comments of r52 say that Arc is now supported, although there is a "todo - not 
supported yet" in the SVGParser.java in the body of the drawArc method on line 
568.

Original issue reported on code.google.com by [email protected] on 26 Sep 2012 at 7:33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.