Skip to content

Instantly share code, notes, and snippets.

@philippeback
Created February 11, 2018 22:08
Show Gist options
  • Save philippeback/98e1045b66ea3763ab10d64c135f9370 to your computer and use it in GitHub Desktop.
Save philippeback/98e1045b66ea3763ab10d64c135f9370 to your computer and use it in GitHub Desktop.
| 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
-=-=-=-=-=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=
| 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment