我正在尝试围绕一组形状绘制一个边界框。我得到了场景中的所有内容,但我不知道如何使边界框和文本正确对齐:
c := RSCanvas new.
text := RSGroup new.
foo := RSLabel new text: 'foo'.
bar := RSLabel new text: 'bar'.
text add: foo; add: bar.
RSVerticalLineLayout on: text.
bound := RSShapeFactory box
model: self;
border: (RSBorder new width: 1; color: Color black);
cornerRadius: 5;
width: text encompassingRectangle width + 15;
height: text encompassingRectangle height + 10.
all := RSComposite new shapes: { bound. text asShape }.
c add: all.
c @ RSCanvasController.
^ c