tweaked poster symbol rendering

pull/95/head
jmoenig 2020-02-10 20:12:31 +01:00
rodzic 94bc4c8075
commit 55f0ffb28a
1 zmienionych plików z 13 dodań i 5 usunięć

Wyświetl plik

@ -50,7 +50,6 @@ WorldMorph.prototype.customMorphs = function () {
// add examples to the world's demo menu // add examples to the world's demo menu
return [ return [
'storage',
'poster', 'poster',
'flash', 'flash',
'brush', 'brush',
@ -897,22 +896,31 @@ SymbolMorph.prototype.renderSymbolPoster = function (ctx, color) {
ctx.strokeStyle = color.toString(); ctx.strokeStyle = color.toString();
ctx.lineWidth = w / 15; ctx.lineWidth = w / 15;
ctx.beginPath();
ctx.moveTo(w / 2, h / 3); ctx.moveTo(w / 2, h / 3);
ctx.lineTo(w / 6, h); ctx.lineTo(w / 6, h);
ctx.stroke(); ctx.stroke();
ctx.beginPath();
ctx.moveTo(w / 2, h / 3); ctx.moveTo(w / 2, h / 3);
ctx.lineTo(w / 2, h); ctx.lineTo(w / 2, h);
ctx.stroke(); ctx.stroke();
ctx.beginPath();
ctx.moveTo(w / 2, h / 3); ctx.moveTo(w / 2, h / 3);
ctx.lineTo(w * 5 / 6, h); ctx.lineTo(w * 5 / 6, h);
ctx.stroke(); ctx.stroke();
ctx.fillRect(0, 0, w, bottom); ctx.beginPath();
ctx.clearRect(0, bottom, w, w / 20); ctx.moveTo(0, 0);
ctx.lineTo(w, 0);
ctx.clearRect(w - edge, bottom - edge, edge + 1, edge + 1); ctx.lineTo(w, bottom - edge);
ctx.lineTo(w - edge, bottom - edge);
ctx.lineTo(w - edge, bottom);
ctx.lineTo(0, bottom);
ctx.closePath();
ctx.fill();
ctx.fillStyle = color.darker(25).toString(); ctx.fillStyle = color.darker(25).toString();
ctx.beginPath(); ctx.beginPath();