summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-02-04 15:29:14 +0100
committerjmoenig <jens@moenig.org>2014-02-04 15:29:14 +0100
commit1fb0b7799834280a759eb238b8d138b60223b1c2 (patch)
tree0a0661f3dc4d8eeaeef5e941d4ca8ef156461c1c /objects.js
parent9be9d3da11461f218108eb3375875e6363208a7b (diff)
downloadsnap-byow-1fb0b7799834280a759eb238b8d138b60223b1c2.tar.gz
snap-byow-1fb0b7799834280a759eb238b8d138b60223b1c2.zip
Flat line end option in the settings menu, saved with the project
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/objects.js b/objects.js
index af482b1..1c9a166 100644
--- a/objects.js
+++ b/objects.js
@@ -124,7 +124,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2014-January-09';
+modules.objects = '2014-February-04';
var SpriteMorph;
var StageMorph;
@@ -186,6 +186,7 @@ SpriteMorph.prototype.sliderColor
SpriteMorph.prototype.isCachingPrimitives = true;
SpriteMorph.prototype.enableNesting = true;
+SpriteMorph.prototype.useFlatLineEnds = false;
SpriteMorph.prototype.highlightColor = new Color(250, 200, 130);
SpriteMorph.prototype.highlightBorder = 8;
@@ -2717,8 +2718,13 @@ SpriteMorph.prototype.drawLine = function (start, dest) {
if (this.isDown) {
context.lineWidth = this.size;
context.strokeStyle = this.color.toString();
- context.lineCap = 'round';
- context.lineJoin = 'round';
+ if (this.useFlatLineEnds) {
+ context.lineCap = 'butt';
+ context.lineJoin = 'miter';
+ } else {
+ context.lineCap = 'round';
+ context.lineJoin = 'round';
+ }
context.beginPath();
context.moveTo(from.x, from.y);
context.lineTo(to.x, to.y);