Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37534

Re: Problem drawing lines on a canvas element

Newsgroups comp.lang.javascript
Date 2019-10-12 15:50 -0700
References <8c504426-06b7-4f57-babf-7c2d64aaace5@googlegroups.com> <qnje3h$r8e$1@dont-email.me> <cee794bf-a21b-457c-8926-ebb16641c040@googlegroups.com> <d9d6a215-a01e-465e-bac9-b1ccbebb5029@googlegroups.com> <qnrejc$8o4$1@dont-email.me>
Message-ID <5e91ed84-fa98-40d5-bfee-e06f0ddea927@googlegroups.com> (permalink)
Subject Re: Problem drawing lines on a canvas element
From dr.j.r.stockton@gmail.com

Show all headers | View raw


On Saturday, 12 October 2019 03:42:59 UTC+1, Alan  wrote:

> Your code seems to work fine for me. Please provide the actual, 
> problematic Sinuous() calls you are using.
> 
> (I only read newsgroups once in the evening, so feel free to continue 
> this discussion via email for a more prompt response.)

Ah, but when is the evening? ... Ah, I see that you are four hours behind GMT.  

I reduced the code by throwing out, piece by piece, all that seemed irrelevant, and reached, after initialising code, what follows :-
 
  Sinuous("blue", [550,650], [400,])

  if (F.GG.checked) {
   CX.beginPath()                // <--- That was absent.  OK now.
   CX.strokeStyle = "red"
   CX.moveTo(10, 300)
   CX.lineTo(470, 300)
   CX.stroke() }

IMHO, there should be an endPath method (which sets the Path to ReadOnly) which a programmer could use to defend against this error, but I've not yet seen one.

Thanks again.

-- 
  (c) John Stockton, near London, UK.  Using Google Groups.           |
 Mail: J.R.""""""""@physics.org - or as Reply-To, if any.             |

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Problem drawing lines on a canvas element Alan <araskin@gmail.com> - 2019-10-08 21:46 -0400
  Re: Problem drawing lines on a canvas element dr.j.r.stockton@gmail.com - 2019-10-09 02:25 -0700
    Re: Problem drawing lines on a canvas element dr.j.r.stockton@gmail.com - 2019-10-11 15:41 -0700
      Re: Problem drawing lines on a canvas element Alan <araskin@gmail.com> - 2019-10-11 22:44 -0400
        Re: Problem drawing lines on a canvas element dr.j.r.stockton@gmail.com - 2019-10-12 15:50 -0700
          Re: Problem drawing lines on a canvas element "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2019-10-12 20:36 -0700
            Re: Problem drawing lines on a canvas element luserdroog <luser.droog@gmail.com> - 2019-10-12 22:14 -0700

csiph-web