go-imgrow/scalerectangle.go

13 lines
228 B
Go

package imgrow
import (
"image"
)
func scaleRectangle(scalar int, rectangle image.Rectangle) image.Rectangle {
return image.Rectangle{
Min: scalePoint(scalar, rectangle.Min),
Max: scalePoint(scalar, rectangle.Max),
}
}