{"action":"created","issue":{"url":"https://api.github.com/repos/evil-mad/robopaint/issues/223","labels_url":"https://api.github.com/repos/evil-mad/robopaint/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/evil-mad/robopaint/issues/223/comments","events_url":"https://api.github.com/repos/evil-mad/robopaint/issues/223/events","html_url":"https://github.com/evil-mad/robopaint/issues/223","id":100427611,"number":223,"title":"Big Discussion: The future of Method Draw","user":{"login":"techninja","id":320747,"avatar_url":"https://avatars.githubusercontent.com/u/320747?v=3","gravatar_id":"","url":"https://api.github.com/users/techninja","html_url":"https://github.com/techninja","followers_url":"https://api.github.com/users/techninja/followers","following_url":"https://api.github.com/users/techninja/following{/other_user}","gists_url":"https://api.github.com/users/techninja/gists{/gist_id}","starred_url":"https://api.github.com/users/techninja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techninja/subscriptions","organizations_url":"https://api.github.com/users/techninja/orgs","repos_url":"https://api.github.com/users/techninja/repos","events_url":"https://api.github.com/users/techninja/events{/privacy}","received_events_url":"https://api.github.com/users/techninja/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/evil-mad/robopaint/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/evil-mad/robopaint/labels/method-draw","name":"method-draw","color":"009800"},{"url":"https://api.github.com/repos/evil-mad/robopaint/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-11T22:44:17Z","updated_at":"2015-08-11T23:00:48Z","closed_at":null,"body":"Soooo... We've been living with a big kind of smelly elephant in the room for years now, and the topic has never come up. He pulls his weight when he needs to, even if he continues to drag us down [often enough to not forget](https://github.com/evil-mad/robopaint/labels/method-draw).\r\n\r\nIn fact it's so easy to break Method Draw (herein referred to as MD) by just trying to use it, it's laughable. Yet the interface remains clean, and (mostly) usable and better than the application components we've surrounded it with. The first task I was given for the notably different app PancakeCreator (herein referred to as PC), was to duplicate a number of SVGEdit/MD interface elements like selection rectangles and node control handles. I was a bit scared to create them, but I was even more scared of the huge, hacky and pretty well outdated codebase that is the somewhat abandoned MD.\r\n\r\nThen I found [Paper.js](http://paperjs.org). A massive and far reaching framework that calls itself \"The Swiss Army Knife of Vector Graphics Scripting.\". I'd come across it years ago when first building RP, but went another direction as it seemed very animation oriented. I gave it another look before starting to build the drawing application for PC. Once I found it managed control points, path segments, and vectors in ways that can have math applied directly to them, I knew it was going to change everything. \r\n\r\nIn addition to a vast array of path object based abstractions for a professional level hierarchy of project > layer> path, full SVG import/export, **and** built in definition for creation of mouse tools, it has support for the following previously \"impossible\" operations:\r\n * [Filled path boolean operations](http://paperjs.org/reference/pathitem/#unite-path) like \"union\", \"subtract\" & \"exclude\"\r\n * [High accuracy clean path smoothing/simplification](http://paperjs.org/tutorials/paths/smoothing-simplifying-flattening/#simplifying-paths) for \"pencil\" drawing input\r\n * [High quality efficient \"flatten\" conversion](http://paperjs.org/reference/path/#flatten-maxDistance) of any paths to polygons in milliseconds\r\n\r\nOh and it does awesome stuff with rasters too: http://paperjs.org/examples/spiral-raster/\r\n![Spiral raster mona lisa](https://cloud.githubusercontent.com/assets/320747/9211780/235167b4-4039-11e5-9c5f-ce7f6aa749e0.png)\r\n_(can you imagine that as a varied height painting mode?!? Awesome!)_\r\n\r\n### So, what's my point? Where is this all getting to?\r\nNear as I can tell in my cursory glances, almost every single tool, command, and setting available in MD is something that Paper.js can do basically \"out of the box\", or with some surprisingly small amount of tool logic support code. All the notably complicated SVG parsing, rendering, view zooming & object selection business could be (in theory) handled by this up to date and actively updated framework that prides itself on doing these things well and right. The application logic, tool/button interface and everything else could be handled in a relatively small and far easier to manage codebase.\r\n\r\nI'm not saying that it's \"easy\" either. Some large parts of an implementation like this may be quite straightforward, but it's still going to take some real effort.\r\n\r\n### Great, so you've sold me on it. Now what?\r\nYea, I know. I've got no time these days, but I think this deserves some discussion. There might even be interest in either the Paper.js or Method-Draw communities.\r\n * In the Paper community to have a nice looking example of their library as a drawing application.\r\n * & in the MD community as a replacement of the somewhat funky SVGEdit back end, but in keeping to the simplification and clean user interface goals they originally set out with.\r\n\r\nThough of course my immediate fear is that there's not enough MD community left to muster anything for this big of a schism, and that the Paper.js community, though over 10x bigger, is unlikely to embrace such a project as it does not resemble much of their current example set. Despite these possibilities, I will be posting issues looking for interested parties in the queues & message boards and linking back here where we should have the main discussion."},"comment":{"url":"https://api.github.com/repos/evil-mad/robopaint/issues/comments/130104920","html_url":"https://github.com/evil-mad/robopaint/issues/223#issuecomment-130104920","issue_url":"https://api.github.com/repos/evil-mad/robopaint/issues/223","id":130104920,"user":{"login":"oskay","id":1009180,"avatar_url":"https://avatars.githubusercontent.com/u/1009180?v=3","gravatar_id":"","url":"https://api.github.com/users/oskay","html_url":"https://github.com/oskay","followers_url":"https://api.github.com/users/oskay/followers","following_url":"https://api.github.com/users/oskay/following{/other_user}","gists_url":"https://api.github.com/users/oskay/gists{/gist_id}","starred_url":"https://api.github.com/users/oskay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskay/subscriptions","organizations_url":"https://api.github.com/users/oskay/orgs","repos_url":"https://api.github.com/users/oskay/repos","events_url":"https://api.github.com/users/oskay/events{/privacy}","received_events_url":"https://api.github.com/users/oskay/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T23:00:48Z","updated_at":"2015-08-11T23:00:48Z","body":"Lots to think about here-- I need to try some hands-on tests.  \r\n\r\nSpiral paint is AMAZING."}}