feat: support dots render function
This commit is contained in:
parent
7e4de64a0d
commit
8314a2cb37
3 changed files with 393 additions and 46 deletions
|
|
@ -124,6 +124,7 @@ func PainterThemeOption(theme ColorPalette) PainterOption {
|
|||
}
|
||||
}
|
||||
|
||||
// PainterWidthHeightOption set width or height of draw painter
|
||||
func PainterWidthHeightOption(width, height int) PainterOption {
|
||||
return func(p *Painter) {
|
||||
if width > 0 {
|
||||
|
|
@ -678,3 +679,11 @@ func (p *Painter) Grid(opt GridOption) *Painter {
|
|||
}
|
||||
return p
|
||||
}
|
||||
|
||||
func (p *Painter) Dots(points []Point) *Painter {
|
||||
for _, item := range points {
|
||||
p.Circle(5, item.X, item.Y)
|
||||
}
|
||||
p.FillStroke()
|
||||
return p
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue