Open
Description
When I use loadShape
with some SVGs
it's not rendering properly in Android mode.
But it's getting rendered correctly in the java mode.
This is one such svg
But this svg is getting rendered correctly.
I've put together this simple code that demos what I mean.
PShape svg;
int num = 1;
String[] assets = {
"tomato.svg", "ogears.svg", "watermelon.svg", "kiwi.svg"
};
void settings() {
size(displayWidth, displayHeight);
}
void setup(){
svg = loadShape(assets[num]);
}
void draw(){
background(255);
push();
scale(map(mouseY, 0, height, 0, 1));
shape(svg);
push();
noFill();
stroke(0);
strokeWeight(1);
rect(0, 0, svg.width, svg.height);
pop();
pop();
}
void push(){
pushMatrix();
pushStyle();
}
void pop(){
popStyle();
popMatrix();
}
void mousePressed(){
num++;
num = num % 4;
svg = loadShape(assets[num]);
}
A simple project file which can be opened with processing
SVGTests.zip
And it is not working even when I use size(.., .., P2D)
.