Skip to content
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

vgimg: consider migrating backend to github.com/fogleman/gg #470

Closed
kortschak opened this issue Sep 17, 2018 · 0 comments · Fixed by #471
Closed

vgimg: consider migrating backend to github.com/fogleman/gg #470

kortschak opened this issue Sep 17, 2018 · 0 comments · Fixed by #471

Comments

@kortschak
Copy link
Member

Over the years we've had numerous problems because of API changes and bugs in github.com/llgcode/draw2d (some of which still exist). I'd like to suggest we have a look at github.com/fogleman/gg as a replacement.

sbinet added a commit to sbinet-gonum/plot that referenced this issue Sep 17, 2018
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 1, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 12, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 12, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 12, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 12, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 13, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 18, 2019
sbinet added a commit to sbinet-gonum/plot that referenced this issue Feb 19, 2019
sbinet added a commit that referenced this issue Feb 19, 2019
This CL modifies the vgimg backend implementation to use fogleman/gg
instead of llgcode/draw2d.

This CL adds consistent handling of DPI for the fogleman/gg backend.
The old backend required to be communicated the current DPI for the
image.
This new backend does not, as the DPI is only needed for the font.
gg handles fonts via golang.org/x/image/font.Face that embeds the DPI
upon creation of that font.

The vg/vgimg.Canvas carries its own DPI information and propagates it
correctly upon font registration and creation.
This evacuates the need to communicate the current DPI to gg.

Note that the fogleman/gg backend does not have support for dash lines with
offsets and needs to be eventually implemented upstream.

Updates fogleman/gg#64.
Fixes #231.
Fixes #470.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant