code to display shape's innerBox
This commit is contained in:
parent
67a28645f4
commit
ff55ca932f
1 changed files with 9 additions and 4 deletions
|
|
@ -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>`)
|
||||
|
|
|
|||
Loading…
Reference in a new issue