locked
paint app not working proper on win 8 surface tab

    Question

  • Hi all 

    I have devolped the HTML 5 paint application in win 8 metro style. When i run it on surface tab and choose the pencil mode.

    same part of draw pattern get straight and after word it will draw proper pattern as per pencil move.

    following is my code for draw on surface :- 

    var onPaint = function () { if (DrawingMode == "paint") { ctx.globalCompositeOperation = "source-over"; ctx.strokeStyle = SelectedColor; ctx.lineWidth = parseFloat(penThickness); } else { ctx.globalCompositeOperation = "destination-out"; ctx.strokeStyle = "rgba(255,255,255,1)"; ctx.lineWidth = eraserThickness; } ctx.lineJoin = 'round'; ctx.lineCap = 'round'; ctx.beginPath(); ctx.moveTo(last_mouse.x, last_mouse.y); ctx.lineTo(mouse.x, mouse.y); ctx.stroke(); };


    and ctx is canvas on which i put drawing.

    var canvas = document.querySelector('#Canvas1');
                    var ctx = canvas.getContext('2d');

    colud anyone know the solution for same ?

    Thanks in advanced.



    Wednesday, February 20, 2013 4:20 AM

All replies

  • Hi Atul,

    I'm not sure I understand what the problem is. Can you please describe the symptoms in more detail? It would help if you would the actual behavior that you are seeing and compare that with the behavior that you expect.

    I will also move this to the HTML forum for you.

    --Rob

    Thursday, February 21, 2013 2:34 AM
    Owner