On Thursday, 8 March 2018 at 22:08:30 UTC, aberba wrote:
On Thursday, 8 March 2018 at 19:24:43 UTC, WebFreak001 wrote:
On Thursday, 8 March 2018 at 03:55:35 UTC, Adam D. Ruppe wrote:
https://github.com/adamdruppe/arsd

nanovega.d

[...]

AMAZING! I think this will revolutionize how we do GUI and rendering in D, especially nogc. You can make really cool effects and renders very quickly.

Got some cool project ideas how you could use this already. You could make a WPF clone in D for example if you put in a lot of time, but it would probably be far superior than all other currently existing GUI toolkits if you get the data binding and event layer right.

And theming. Especially with a subset of CSS.

Yeah you can make really cool effects: https://wfr.moe/fFYvHH.png

---

string txt = "Text me up.";
float[4] bounds;
nvg.fontFace = "Roboto";
nvg.fontSize = 32;
nvg.textBounds(64, 64, txt, bounds[]);
nvg.beginPath();
nvg.roundedRect(bounds[0] - 32, bounds[1] - 8 + 8, bounds[2]-bounds[0] + 64, bounds[3]-bounds[1] + 16, 4); nvg.fillPaint = nvg.linearGradient(bounds[0], bounds[1], bounds[2], bounds[3], NVGColor("#c50"), NVGColor("#860"));
nvg.fill();
nvg.beginPath();
nvg.roundedRect(bounds[0] - 32, bounds[1] - 8, bounds[2]-bounds[0] + 64, bounds[3]-bounds[1] + 16, 4); nvg.fillPaint = nvg.linearGradient(bounds[0], bounds[1], bounds[2], bounds[3], NVGColor("#f70"), NVGColor("#a90"));
nvg.fill();
nvg.fillPaint = pattern;
nvg.fill();
nvg.beginPath();
nvg.roundedRect(bounds[0] - 32, bounds[1] - 8, bounds[2]-bounds[0] + 64, bounds[3]-bounds[1] + 16 + 8, 4);
nvg.strokeColor = NVGColor.white;
nvg.strokeWidth = 2;
nvg.stroke();
nvg.fillColor = NVGColor.black;
nvg.text(64, 64, txt);

Reply via email to