Stroke not working on imported .svg graphics.
              in 
             Programming Questions 
              •  
              1 month ago    
            
 
           
             Hi!
            
             
            
            
              
           
 
            
           
             I am having this peculiar problem that seems to be related to Eclipse. I cannot get to show the stroke on imported .svg graphics. For example the very simple code:
            
            - import processing.core.*;
 - import processing.opengl.*;
 - public class TestClassProcessing extends PApplet
 - {
 - public static void main(String args[])
 - {
 - PApplet.main(new String[] { "--present", "TestClassProcessing" });
 - }
 - //Global variables
 - PShape s;
 - public void setup()
 - {
 - size(1000,700,P3D);
 - background(0);
 - s = loadShape("tri2.svg");
 - }
 - public void draw()
 - {
 - frameRate(30);
 - stroke(255);
 - background(0);
 - s.disableStyle();
 - pushStyle();
 - strokeWeight(10);
 - fill(255,20,10);
 - stroke(255,255,20);
 - shape(s,300,300,70,70);
 - rect(400,400,70,70);
 - popStyle();
 - PApplet.println("ny draw");
 - }
 - }
 
Generates a very simple rectangle (svg) that does not have any stroke and a rectangle with correct stroke width. See picture.
When running the same application in the standard processing IDE i get the following result (where the thickness of the stroke is due to the sacling of the .svg graphics).
Anyone have any ideas why this is so?
Thank you!
Lukas
 
              
              1  
            
 
            