diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-01-11 10:40:58 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-01-11 10:40:58 +0100 |
| commit | 7311c3ee0cc93e50e5adcb521a94e8738ed98eb2 (patch) | |
| tree | 80c4734abb1e6824018f2c811de1865737e766bf /paint.js | |
| parent | b80efbef70b64c1ee982d4ba5116f4df71d169ad (diff) | |
| parent | b315ac3c9b85a63b6c2ad644828c9b3f3f849345 (diff) | |
| download | snap-7311c3ee0cc93e50e5adcb521a94e8738ed98eb2.tar.gz snap-7311c3ee0cc93e50e5adcb521a94e8738ed98eb2.zip | |
Merge pull request #677
Diffstat (limited to 'paint.js')
| -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; |
