Skip to content

Commit

Permalink
egui AddGridTab method
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Aug 30, 2024
1 parent a349afb commit 7c3127a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions egui/grids.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ func (gui *GUI) SetGrid(name string, tg *tensorcore.TensorGrid) {
gui.Grids[name] = tg
}

// AddGridTab adds TensorGrid with a new
// tab and plot of given name.
func (gui *GUI) AddGridTab(name string) *tensorcore.TensorGrid {
tab, _ := gui.Tabs.NewTab(name)
grid := tensorcore.NewTensorGrid(tab)
gui.SetGrid(name, grid)
return grid
}

// ConfigRasterGrid configures a raster grid for given layer name.
// Uses Raster_laynm and given Tensor that has the raster data.
func (gui *GUI) ConfigRasterGrid(lay *core.Frame, laynm string, rast *tensor.Float32) *tensorcore.TensorGrid {
Expand Down

0 comments on commit 7c3127a

Please sign in to comment.