-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load PShape from String, instead of URI #316
Comments
From f...@processing.org on June 23, 2010 19:46:53 loadShape(new XMLElement(svg)) ...which is about as many characters as loadShapeFromString(svg). |
From niho...@gmail.com on June 23, 2010 20:00:33 |
From niho...@gmail.com on July 16, 2010 17:30:32 XMLElement x = new XMLElement(""); it cites the error "method loadShape(String) in PApplet is not applicable to arguments (XMLElement)", so it would look like either this functionality got removed (which would be horrible!) or it was never there (equally horrible!). Can I reopen the request for building a PShape from an SVG string in some manner? I like the idea of doing it via XMLElement, so if that can be made to work, all the better. |
From f...@processing.org on July 16, 2010 20:42:58 |
From niho...@gmail.com on July 16, 2010 21:48:43 |
From niho...@gmail.com on April 08, 2011 17:42:11 PShape s = new PShapeSVG(XMLElement.parse("...")); |
From niho...@gmail.com on April 08, 2011 18:01:47 |
From f...@processing.org on June 20, 2011 20:06:50 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Original author: niho...@gmail.com (June 23, 2010 19:41:09)
It would be extremely useful if there was a way to construct a PShape from a valid SVG string, rather than from URI, because this would make it possible to have write Processing code that dynamically generates a legal SVG string and then turn it into a PShape for use in the sketch.
Since this functionality is technically already in the code (because PShape has to call the string-parsing methods after it resolves the svg URI), could it be made public?
Might I request something like:
String svg = "<svg ...><path d='...'/>...</svg>";
PShape s = loadShapeFromString(svg);
shape(s, 0, 0, 50, 50);
Original issue: http://code.google.com/p/processing/issues/detail?id=277
The text was updated successfully, but these errors were encountered: