Related to https://github.com/psychopy/psychojs/issues/44 point 2. This
fix allows users to call setSize to change rect size, as with Python code.
To change rect size, the setSize method calls the setWidth and
setHeight methods of Rect stim.
As noted in this discourse post:
https://discourse.psychopy.org/t/slider-setreadonly-sets-contrast-incorrectly/7055
Also, I wonder if we should be changing contrast by halving the color
values (if they are signed color vals) rather than the transparency, in
keeping with the Python version. Transparency will be weird if the scale
is on a textured backgorund?