I use the paperjs graphical objects library with Amber Smalltalk.
I want to translate the following Javascript constructors for a Point object to Amber Smalltalk
paper.Point(x, y)
paper.Point(array)
paper.Point(object)
paper.Point(size)
paper.Point(point)
The following Smalltalk
paper Point new inspect
gives a point
{ x: 0, y: 0 }
To construct an array in an Amber workspace I do
#(100 100)
The printIt is
an Array (100 100)
However
paper Point value: #(100 100)
gives nil as the result.
Question
How do I translate the paper.Point(array)
constructor from JavaScript to Amber as well as the other constructurs?
References
The Amber Smalltalk equivalent of new paper.Paper(100,100)
(JavaScript) is
paper Point newValue: 100 value: 100
This gives
{ x: 100, y: 100 }
Reference
https://github.com/amber-smalltalk/amber/wiki/Call-javascript-constructors-with-arguments