aboutsummaryrefslogtreecommitdiffstats
path: root/app.go
diff options
context:
space:
mode:
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