code to display shape's innerBox

This commit is contained in:
Gavin Nishizawa 2023-11-15 16:46:42 -08:00
parent 67a28645f4
commit ff55ca932f
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -1192,10 +1192,15 @@ func drawShape(writer, appendixWriter io.Writer, diagramHash string, targetShape
}
}
// to examine GetInsidePlacement
// padX, padY := s.GetDefaultPadding()
// innerTL := s.GetInsidePlacement(s.GetInnerBox().Width, s.GetInnerBox().Height, padX, padY)
// fmt.Fprint(writer, renderOval(&innerTL, 5, 5, "fill:red;"))
// to examine shape's innerBox
innerBox := s.GetInnerBox()
el := d2themes.NewThemableElement("rect")
el.X = float64(innerBox.TopLeft.X)
el.Y = float64(innerBox.TopLeft.Y)
el.Width = float64(innerBox.Width)
el.Height = float64(innerBox.Height)
el.Style = "fill:rgba(255,0,0,0.5);"
fmt.Fprint(writer, el.Render())
// Closes the class=shape
fmt.Fprint(writer, `</g>`)