Roassal 시각화에서 수직 레이블을 얻을 수있는 방법을 찾지 못했습니다. 방법이 있습니까? 또는 요소를 회전시키는 일반적인 방법입니까?Roassal을 사용하여 세로 레이블을 얻는 방법은 무엇입니까?
0
A
답변
2
새로운 버전, Roassal2에서
| view |
view := ROView new.
-15 to: 10 do: [ :i |
view add: ((ROLabel verticalText interlineSpace: i) elementOn: 'hello world').
].
ROHorizontalLineLayout on: view elements.
view open
는 지원 레이블을 회전 않습니다. 위의 예제의 경우 , 지금 당신은 할 수 있습니다 :
| view |
view := RTView new.
-15 to: 10 do: [ :i |
view add: ((RTRotatedLabel new angleInDegree: -90) elementOn: 'hello world').
].
RTHorizontalLineLayout on: view elements.
view open
당신은 얻을 것이다 :
또 다른 예 :
| v shape |
v := RTView new.
shape := RTRotatedLabel new.
shape angleInDegree: [ :cls | cls numberOfMethods negated/1.5 ].
shape text: [ :cls | ' ', cls name ].
shape color: (Color black alpha: 0.2).
v addAll: (shape elementsOn: Collection withAllSubclasses).
v canvas color: Color white.
v open
당신은해야합니다 :
도움이 되었기를 바랍니다. :
2
현재 Roassal는 이러한 기능을 지원하지 않습니다. 그러나 가까이에 뭔가를 얻을 수 있습니다. Roassal 1.422
+0
감사합니다. 그건 아주 흥미로운 해결 방법 :) – MartinW
차가운. 고맙습니다. 이미지를 추가했습니다. – MartinW