d2/lib/shape/shape_text.go
Alexander Wang 524c089a74 oss
Co-authored-by: Anmol Sethi <hi@nhooyr.io>
2022-11-03 06:54:49 -07:00

21 lines
294 B
Go

package shape
import (
"oss.terrastruct.com/d2/lib/geo"
)
// Text is basically a rectangle
type shapeText struct {
shapeSquare
}
func NewText(box *geo.Box) Shape {
return shapeText{
shapeSquare: shapeSquare{
baseShape: &baseShape{
Type: TEXT_TYPE,
Box: box,
},
},
}
}