d2/lib/shape/shape_class.go
2023-01-26 16:44:19 -08:00

25 lines
373 B
Go

package shape
import (
"oss.terrastruct.com/d2/lib/geo"
)
// Class is basically a rectangle
type shapeClass struct {
shapeSquare
}
func NewClass(box *geo.Box) Shape {
return shapeClass{
shapeSquare{
baseShape: &baseShape{
Type: CLASS_TYPE,
Box: box,
},
},
}
}
func (s shapeClass) GetDefaultPadding() (paddingX, paddingY float64) {
return 0, 0
}