diff options
| author | John <studej02@pf.jcu.cz> | 2014-12-27 22:06:03 +0100 |
|---|---|---|
| committer | John <studej02@pf.jcu.cz> | 2014-12-27 22:06:03 +0100 |
| commit | b315ac3c9b85a63b6c2ad644828c9b3f3f849345 (patch) | |
| tree | 4eda8a26597f8e1a0c85cbab340c9d4eea21458c | |
| parent | 2649d13306356ed2f7a0e5e07a6c894f2dcd8875 (diff) | |
| download | snap-b315ac3c9b85a63b6c2ad644828c9b3f3f849345.tar.gz snap-b315ac3c9b85a63b6c2ad644828c9b3f3f849345.zip | |
draw rotation center coordinates near crosshairs
| -rw-r--r-- | paint.js | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -657,6 +657,13 @@ PaintCanvasMorph.prototype.drawcrosshair = function (context) { ctx.strokeStyle = 'black'; ctx.clearRect(0, 0, this.mask.width, this.mask.height); + //draw rotation center coordinates near crosshairs + ctx.globalAlpha = 1; + ctx.fillStyle = "blue"; + ctx.font = "bold 10px Arial"; + var coordinates = -Math.floor((this.mask.width/2 - rp.x)) + ', ' + Math.floor((this.mask.height/2 - rp.y)); + ctx.fillText(coordinates, rp.x + 20, rp.y - 20); + // draw crosshairs: ctx.globalAlpha = 0.5; |
