aboutsummaryrefslogtreecommitdiffstats
path: root/app.go
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2022-06-20 18:26:58 -0230
committerSam Anthony <sam@samanthony.xyz>2022-06-20 18:26:58 -0230
commit2cc9053e108a649a302f5ecf0306b682d820d4e1 (patch)
treec10f3151e75c5b0bbf0f9a540527e7b6748b7603 /app.go
parent31605150d3e10b08dad2086005c64664f5648a51 (diff)
downloadvolute-2cc9053e108a649a302f5ecf0306b682d820d4e1.zip
use gio for uistaging
Diffstat (limited to 'app.go')
-rw-r--r--app.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app.go b/app.go
index f0f5068..8e9d8bb 100644
--- a/app.go
+++ b/app.go
@@ -35,13 +35,13 @@ type App struct {
FlowUnit mass.FlowRate
Comp compressor.Compressor
- CompImg image.Image
+ CompImg *image.NRGBA
}
func NewApp() (App, error) {
a := App{
Displacement: 2 * volume.Litre,
- VolumeUnit: volume.Litre,
+ VolumeUnit: volume.CubicCentimetre,
Rpm: []int{2000},
@@ -91,7 +91,7 @@ func (a *App) SetCompressor(c compressor.Compressor) error {
}
b := j.Bounds()
- m := image.NewRGBA(image.Rect(0, 0, b.Dx(), b.Dy()))
+ m := image.NewNRGBA(image.Rect(0, 0, b.Dx(), b.Dy()))
draw.Draw(m, m.Bounds(), j, b.Min, draw.Src)
a.Comp = c