d2/lib/shape/shape_square.go

23 lines
291 B
Go
Raw Normal View History

package shape
import (
"oss.terrastruct.com/d2/lib/geo"
)
type shapeSquare struct {
*baseShape
}
func NewSquare(box *geo.Box) Shape {
return shapeSquare{
baseShape: &baseShape{
Type: SQUARE_TYPE,
Box: box,
},
}
}
func (s shapeSquare) IsRectangular() bool {
return true
}