New screenshot:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= v := RTView new.
es := RTEllipse new elementsOn: RTShape withAllSubclasses, TRShape withAllSubclasses. v addAll: es. es @ RTDraggable. es @ RTPopup.
eb := RTEdgeBuilder new. eb view: v. eb shape line color: Color black. eb objects: RTShape withAllSubclasses from: #yourself toAll: #dependentClasses.
RTMetricNormalizer new elements: es; normalizeSize: #numberOfLinesOfCode min: 10 max: 30; normalizeColor: #numberOfMethods using: {Color green . Color red} using: #sqrt; alphaColor: 0.5.
RTForceBasedLayout new charge: -300; on: es.
v edgesDo: #remove.
eb := RTEdgeBuilder new. eb view: v. eb shape gradientLineFrom: Color green to: Color white. eb objects: RTShape withAllSubclasses, TRShape withAllSubclasses from: #yourself to: #superclass.
v -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
On Nov 25, 2014, at 2:29 PM, Alexandre Bergel alexandre.bergel@me.com wrote:
Hi!
Pierre did an excellent work on having gradient lines.
<Screen Shot 2014-11-25 at 2.15.55 PM.png>
| v elem1 elem2 edge | v := RTView new.
elem1 := (RTEllipse new color: (Color blue alpha:0.3); size:20) elementOn: 1. elem2 := (RTEllipse new color: (Color red alpha:0.9); size:20) elementOn: 2. elem2 translateBy: 300@0. v add: elem1. v add: elem2.
edge := RTEdge from:elem1 to:elem2. v add: (edge + (RTGradientColoredLine new colors: (Array with: (elem1 color) with: (elem2 color)); precision: 100; gradientColorShape)). v open -=-=-=-=-=-=-=-=-=-=
<Screen Shot 2014-11-25 at 2.15.47 PM.png>
| v elem1 elem2 edge | v := RTView new.
elem1 := (RTEllipse new color: (Color red alpha:0.3); size:20) elementOn: 1. elem2 := (RTEllipse new color: (Color red alpha:0.9); size:20) elementOn: 2. elem2 translateBy: 300@0. v add: elem1. v add: elem2.
edge := RTEdge from:elem1 to:elem2. v add: (edge + (RTGradientColoredLine new colors: (Array with: (elem1 color) with: (elem2 color)); precision: 100; gradientColorShape)). v open -=-=-=-=-=-=-=-=-=-=
Feedback are welcomed!
Pierre & Alexandre
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev