Changing components on e.g. document.currentStyle.fillColor does not currently update currentStyle on Scriptographer, although Color and PathStyle now implement ChangeEmitter / Receiver:
document.currentStyle = {
strokeColor: 'white',
strokeWidth: 10,
fillColor: new RGBColor(0, 1, 1)
};
function onMouseDown(event) {
document.currentStyle.fillColor.red += 0.1;
}
function onMouseDrag(event) {
var delta = event.point - event.downPoint,
radius = delta.length,
points = 5 + Math.round(radius / 50),
position = event.downPoint,
path = new Path.Star(position, points, radius / 2, radius);
path.rotate(delta.angle);
// Remove the path automatically before the next mouse drag
// event:
path.removeOnDrag();
}
Changing components on e.g. document.currentStyle.fillColor does not currently update currentStyle on Scriptographer, although Color and PathStyle now implement ChangeEmitter / Receiver: