go-imgrow/scalerectangle.go

13 lines
228 B
Go
Raw Normal View History

2024-02-09 19:08:43 +00:00
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),
}
}