kopia lustrzana https://github.com/backface/turtlestitch
rodzic
a37dbfeb35
commit
404da65d39
|
@ -4124,3 +4124,4 @@ in development:
|
||||||
------
|
------
|
||||||
* VectorPaint: fixed rotation center editing for existing costumes
|
* VectorPaint: fixed rotation center editing for existing costumes
|
||||||
* VectorPaint: fixed initial rendering, so costumes can be re-opened after saving
|
* VectorPaint: fixed initial rendering, so costumes can be re-opened after saving
|
||||||
|
* Symbols: fixed 'polygon' symbol rendering
|
||||||
|
|
24
symbols.js
24
symbols.js
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.symbols = '2018-March-19';
|
modules.symbols = '2018-June-05';
|
||||||
|
|
||||||
var SymbolMorph;
|
var SymbolMorph;
|
||||||
|
|
||||||
|
@ -1590,18 +1590,20 @@ SymbolMorph.prototype.drawSymbolOctagonOutline = function (canvas, color) {
|
||||||
// answer a canvas showing an octagon
|
// answer a canvas showing an octagon
|
||||||
var ctx = canvas.getContext('2d'),
|
var ctx = canvas.getContext('2d'),
|
||||||
side = canvas.width,
|
side = canvas.width,
|
||||||
vert = (side - (side * 0.383)) / 2;
|
vert = (side - (side * 0.383)) / 2,
|
||||||
|
l = Math.max(side / 20, 0.5);
|
||||||
|
|
||||||
ctx.fillStyle = color.toString();
|
ctx.strokeStyle = color.toString();
|
||||||
|
ctx.lineWidth = l * 2;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(vert, 0);
|
ctx.moveTo(vert, l);
|
||||||
ctx.lineTo(side - vert, 0);
|
ctx.lineTo(side - vert, l);
|
||||||
ctx.lineTo(side, vert);
|
ctx.lineTo(side - l, vert);
|
||||||
ctx.lineTo(side, side - vert);
|
ctx.lineTo(side - l, side - vert);
|
||||||
ctx.lineTo(side - vert, side);
|
ctx.lineTo(side - vert, side - l);
|
||||||
ctx.lineTo(vert, side);
|
ctx.lineTo(vert, side - l);
|
||||||
ctx.lineTo(0, side - vert);
|
ctx.lineTo(l, side - vert);
|
||||||
ctx.lineTo(0, vert);
|
ctx.lineTo(l, vert);
|
||||||
ctx.closePath();
|
ctx.closePath();
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue