2019-04-10 02:17:56 +00:00
|
|
|
// Package dummy implements a dummy doodads.Drawing.
|
|
|
|
package dummy
|
|
|
|
|
2020-04-05 04:00:32 +00:00
|
|
|
import (
|
|
|
|
"git.kirsle.net/apps/doodle/pkg/doodads"
|
|
|
|
"git.kirsle.net/go/render"
|
|
|
|
)
|
2019-04-10 02:17:56 +00:00
|
|
|
|
|
|
|
// Drawing is a dummy doodads.Drawing that has no data.
|
|
|
|
type Drawing struct {
|
2020-04-05 04:00:32 +00:00
|
|
|
Drawing *doodads.Drawing
|
2019-04-10 02:17:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewDrawing creates a new dummy drawing.
|
|
|
|
func NewDrawing(id string, doodad *doodads.Doodad) *Drawing {
|
|
|
|
return &Drawing{
|
|
|
|
Drawing: doodads.NewDrawing(id, doodad),
|
|
|
|
}
|
|
|
|
}
|
2020-04-05 04:00:32 +00:00
|
|
|
|
|
|
|
// Size returns the size of the underlying doodads.Drawing.
|
|
|
|
func (d *Drawing) Size() render.Rect {
|
|
|
|
return d.Drawing.Size()
|
|
|
|
}
|
2021-06-03 04:49:29 +00:00
|
|
|
|
|
|
|
// MoveTo changes the drawing's position.
|
|
|
|
func (d *Drawing) MoveTo(to render.Point) {
|
|
|
|
d.Drawing.MoveTo(to)
|
|
|
|
}
|