fixed dependencies

This commit is contained in:
nuknal
2024-10-24 15:46:01 +08:00
parent d16a5bd9c0
commit 1161e8d054
2005 changed files with 690883 additions and 0 deletions

41
vendor/gonum.org/v1/plot/plotter/glyphbox.go generated vendored Normal file
View File

@@ -0,0 +1,41 @@
// Copyright ©2015 The Gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package plotter
import (
"image/color"
"gonum.org/v1/plot"
"gonum.org/v1/plot/vg"
"gonum.org/v1/plot/vg/draw"
)
// GlyphBoxes implements the Plotter interface, drawing
// all of the glyph boxes of the plot. This is intended for
// debugging.
type GlyphBoxes struct {
draw.LineStyle
}
func NewGlyphBoxes() *GlyphBoxes {
g := new(GlyphBoxes)
g.Color = color.RGBA{R: 255, A: 255}
g.Width = vg.Points(0.25)
return g
}
func (g GlyphBoxes) Plot(c draw.Canvas, plt *plot.Plot) {
for _, b := range plt.GlyphBoxes(plt) {
x := c.X(b.X) + b.Rectangle.Min.X
y := c.Y(b.Y) + b.Rectangle.Min.Y
c.StrokeLines(g.LineStyle, []vg.Point{
{X: x, Y: y},
{X: x + b.Rectangle.Size().X, Y: y},
{X: x + b.Rectangle.Size().X, Y: y + b.Rectangle.Size().Y},
{X: x, Y: y + b.Rectangle.Size().Y},
{X: x, Y: y},
})
}
}