d2/lib/shape/shape_class.go

26 lines
373 B
Go
Raw Normal View History

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) {
2023-01-24 01:19:38 +00:00
return 0, 0
}