-
Notifications
You must be signed in to change notification settings - Fork 404
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
Use a SVG master file to detemine position & size of Controls #240
Comments
fwiw my branch svgdrawing91 https://github.com/baconpaul/surge/tree/svg-drawing-91 integrates an sag parser with surge, loads an svg file, and draws a widget from it. Uses nanosvg and mostly paints correct images from simple SVG files already. I won't ever merge that code now we are going multi-bitmap route but could easily re-add the svg parser. But I also won't delete the branch :) I think this would be great for a post 1.6 release! |
We could also use the same approach to define colors used to render the controls (in another SVG file). For reference, this is how affinity will export a simple rectangle that I named "osc".
|
Yeah exactly. Pallete is just an svg file with rectangles with ids in it I will revive my code sometime next week or so. Can you have affinity make an svg with a few rectangles in it for a test? If the svg files get hairy you can always flatten them with Inkscape too before reading |
Yeah I can bake one tomorrow-ish |
Hi: This seems entirely reasonable. I like the idea and especially the flexibility it will afford people in the future. If we can provide a simple skin switching mechanism to the user, and make this change you can effectively let people (like myself) go wild. Just so that Im sure I understand the requirements for designers to help get this rolling: Take source files and add in a bounding rects. Would we need to create a bounding rect for each state in the existing sprite sheets? |
This is some work to get started on #240. Now a partial set of controls have their bounding boxes defined by the exported .svg file which will be part of skins so they can define their size and layout. @baconpaul wanted to have a go at the SVG parsing
This is some work to get started on surge-synthesizer#240. Now a partial set of controls have their bounding boxes defined by the exported .svg file which will be part of skins so they can define their size and layout. @baconpaul wanted to have a go at the SVG parsing Former-commit-id: e84905d8ff2b52e428b616e7e1fb90ef876b0e98 [formerly 28cec18] Former-commit-id: 8f1d308b8bce072aef481d0b4f0644bada64fb59 Former-commit-id: 411b828f61d16ce2382635c00c7f079819d6938a
#1117 will basically do this (although I’m using an XML schema at first pass to do the full layout but could move to SVG easily) so I’m going to close this one and link it to there |
With the nice affinity designer templates @cyanit and @itsmedavep have been working on its going to be really easy to create new skins that also scale well. However as the position of all interactive elements are written in code there is no way to affect them.
If we make the affinity file also export an SVG file where the bounding rectangles of all GUI elements are included (as simple boxes with IDs), we could use this as a lookup table for all the widgets we create and skins would be free to rearrange controls as they chose (the skin and potentially even controls such as sliders can be of a different size too).
Some things we'd need:
Thoughts?
The text was updated successfully, but these errors were encountered: