I wonder if there's a way to simulate elliptical gradients with only circular 
gradients and affine transformations, so package ui can also render these files 
directly using the system native vector graphics APIs.

Does this also require the cairo/Quartz feature of having a circular gradient 
have an inner circle and an outer circle (instead of a point and an outer 
circle)? If so, I wonder how to simulate that on other platforms as well...


Or in other words, I wonder how I can reconcile the differences between
https://msdn.microsoft.com/en-us/library/windows/desktop/dd368149(v=vs.85).aspx
and
https://www.cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-create-radial
 / 
https://developer.apple.com/reference/coregraphics/1455923-cgcontextdrawradialgradient?language=objc
so that I could possibly implement this with package ui as well.


Preemptive apologies for dropping off the shiny project early on; I was caught 
up in other stuff at the time ^^;

> On Oct 24, 2016, at 2:52 AM, Nigel Tao <nigel...@golang.org> wrote:
> 
> I was looking for a compact, binary format for simple vector graphics.
> I didn't find one that did all I wanted.
> 
> SVG is the de facto standard for vector graphics, in the open source
> world. Unfortunately, https://www.w3.org/TR/SVG/single-page.html
> prints as 400 pages, not including the XML, CSS or XSLT
> specifications. The S in SVG doesn't stand for simple.
> 
> The Haiku Vector Icon Format is pretty close. Unfortunately, I didn't
> find a written specification, only a single C implementation, tightly
> coupled, as far as I could tell, to the Haiku operating system. Also,
> https://www.haiku-os.org/articles/2009-09-14_why_haiku_vector_icons_are_so_small
> says that "you wouldn't really want to use HVIF to store generic
> vector graphics".
> 
> OpenType fonts contain vector graphics (glyphs), and people use it for
> icon and emoji fonts. Unfortunately, there doesn't appear to be a
> clear standard for colored or partially transparent glyphs.
> https://en.wikipedia.org/wiki/OpenType#Color lists three competing
> approaches, built on PNG, SVG or neither.
> 
> So, as an experiment, I invented a new format: IconVG. The format
> itself is documented at
> https://godoc.org/golang.org/x/exp/shiny/iconvg and there are some
> examples at https://go.googlesource.com/exp/+/master/shiny/iconvg/testdata
> 
> The Material Design icon set (https://design.google.com/icons/)
> consists of 961 vector icons. As SVG files, this totals 312,887 bytes.
> As 24*24 pixel PNGs, 190,840 bytes. As 48*48 pixel PNGs, 318,219
> bytes. As IconVGs, 122,012 bytes.
> 
> Like all of the golang.org/x/exp/shiny code, this is experimental, but
> I think that IconVG is at an interesting enough point now to share.
> 
> The vector rasterizer at golang.org/x/image/vector is also a nice Go
> package, in my biased opinion, based on the algorithm described at
> https://medium.com/@raphlinus/inside-the-fastest-font-renderer-in-the-world-75ae5270c445#.ja3y3m6z2,
> but that's probably a different topic for a different time.
> 
> Comments welcome.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to