Skip to content

vg/draw: add a FillStyle #564

Open
Open
@sbinet

Description

@sbinet

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

tentative API:

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
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions