gonum / gonum/plot

vg/draw: add a FillStyle

Open
#564 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

it should be possible to further customize the way one defines a "fill color", by _e.g._ adding a `vg/draw.FillStyle` that would allow to define filling patterns like so:
https://matplotlib.org/3.1.1/gallery/shapes_and_collections/hatch_demo.html
![img](https://matplotlib.org/3.1.1/_images/sphx_glr_hatch_demo_001.png)

tentative API:
```go
package vg/draw

type FillStyle struct {
Color color.Color
Background color.Color
Pattern PatternStyle
}

type PatternStyle uint8
const (
NoPattern PatternStyle = iota
HLinePattern
VLinePattern
HVLinePattern
SlashPattern
DoubleSlashPattern
BackSlashPattern
DoubleBackSlashPattern
PlusPattern
CrossPattern
StarPattern
DotPattern
CirclePattern
BigCirclePattern
)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.