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


Groups > comp.lang.javascript > #20704 > unrolled thread

Drawline in javascript?

Started byjonas.thornvall@gmail.com
First post2013-07-19 01:50 -0700
Last post2013-09-01 16:18 +0200
Articles 20 on this page of 40 — 12 participants

Back to article view | Back to comp.lang.javascript


Contents

  Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 01:50 -0700
    Re: Drawline in javascript? Martin Honnen <mahotrash@yahoo.de> - 2013-07-19 11:12 +0200
      Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 02:30 -0700
    Re: Drawline in javascript? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-07-19 11:15 +0200
    Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 02:23 -0700
      Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 13:09 +0200
        Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 09:15 -0700
          Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 20:08 +0200
            Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 12:15 -0700
              Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 21:42 +0200
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 12:44 -0700
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 12:47 -0700
                  Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 12:50 -0700
          Re: Drawline in javascript? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-07-19 13:00 -0600
            Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 12:06 -0700
              Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 21:34 +0200
              Re: Drawline in javascript? Tim Streater <timstreater@greenbee.net> - 2013-07-19 21:17 +0100
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 13:20 -0700
                  Re: Drawline in javascript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-07-19 13:32 -0700
                    Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 13:39 -0700
                      Re: Drawline in javascript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-07-19 13:53 -0700
                        Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 14:04 -0700
                          Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 14:17 -0700
                    Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 23:27 +0200
                      Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 15:10 -0700
                        Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 15:21 -0700
                          Re: Drawline in javascript? Scott Sauyet <scott@sauyet.com> - 2013-07-20 17:54 +0000
                            Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-20 13:49 -0700
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 13:23 -0700
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 13:30 -0700
                Re: Drawline in javascript? "ViLco" <villiber@tin.it> - 2013-07-23 14:59 +0200
              Re: Drawline in javascript? Martin Leese <please@see.Web.for.e-mail.INVALID> - 2013-07-19 14:30 -0600
                Re: Drawline in javascript? jonas.thornvall@gmail.com - 2013-07-19 13:40 -0700
        Re: Drawline in javascript? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-07-19 13:25 -0700
          Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-19 22:56 +0200
    Re: Drawline in javascript? Ken <so@abdiassoftware.com> - 2013-08-26 22:08 -0500
      Re: Drawline in javascript? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-08-28 19:54 +0100
        Re: Drawline in javascript? Ken <usenet-so@abdiassoftware.com> - 2013-08-28 18:56 -0500
          Re: Drawline in javascript? Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-08-30 20:17 +0100
      Re: Drawline in javascript? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-09-01 16:18 +0200

Page 1 of 2  [1] 2  Next page →


#20704 — Drawline in javascript?

Fromjonas.thornvall@gmail.com
Date2013-07-19 01:50 -0700
SubjectDrawline in javascript?
Message-ID<77581952-f439-4315-b1cd-04b9d79bd15b@googlegroups.com>
I see examples using 2 parameters for moveTo and lineTo

Is there no drawline using 4 parameters drawline((x,y)(x,y))

JT

[toc] | [next] | [standalone]


#20705

FromMartin Honnen <mahotrash@yahoo.de>
Date2013-07-19 11:12 +0200
Message-ID<51e902e0$0$6566$9b4e6d93@newsspool4.arcor-online.net>
In reply to#20704
jonas.thornvall@gmail.com wrote:
> I see examples using 2 parameters for moveTo and lineTo
>
> Is there no drawline using 4 parameters drawline((x,y)(x,y))

If you are asking about the canvas API then 
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Drawing_shapes#Lines 
has example code.

Indeed the API documentation does not list a method called 'drawline':
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D

[toc] | [prev] | [next] | [standalone]


#20713

Fromjonas.thornvall@gmail.com
Date2013-07-19 02:30 -0700
Message-ID<adfbb7d3-33af-4874-aa04-c8ba5face092@googlegroups.com>
In reply to#20705
Den fredagen den 19:e juli 2013 kl. 11:12:01 UTC+2 skrev Martin Honnen:
> jonas.thornvall@gmail.com wrote:
> 
> > I see examples using 2 parameters for moveTo and lineTo
> 
> >
> 
> > Is there no drawline using 4 parameters drawline((x,y)(x,y))
> 
> 
> 
> If you are asking about the canvas API then 
> 
> https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Drawing_shapes#Lines 
> 
> has example code.
> 
> 
> 
> Indeed the API documentation does not list a method called 'drawline':
> 
> https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D

Thank you for the mozilla link

[toc] | [prev] | [next] | [standalone]


#20706

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2013-07-19 11:15 +0200
Message-ID<XnsA2027284E7A52eejj99@194.109.133.133>
In reply to#20704
 wrote on 19 jul 2013 in comp.lang.javascript:

> I see examples using 2 parameters for moveTo and lineTo
> 
> Is there no drawline using 4 parameters drawline((x,y)(x,y))

All 3 are not part of Javascript.

They could be part of an application or platform, however,
or they could be the name of functions defined in a script.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#20712

Fromjonas.thornvall@gmail.com
Date2013-07-19 02:23 -0700
Message-ID<3401c16a-0d93-4560-a767-6c90292a77d5@googlegroups.com>
In reply to#20704
Den fredagen den 19:e juli 2013 kl. 10:50:40 UTC+2 skrev jonas.t...@gmail.com:
> I see examples using 2 parameters for moveTo and lineTo
> 
> 
> 
> Is there no drawline using 4 parameters drawline((x,y)(x,y))
> 
> 
> 
> JT
I found a library at http://www.walterzorn.de/en/jsgraphics/jsgraphics_e.htm#download

[toc] | [prev] | [next] | [standalone]


#20714

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-19 13:09 +0200
Message-ID<3854249.9rPbM97Byf@PointedEars.de>
In reply to#20712
jonas.thornvall@gmail.com wrote:

> jonas.t...@gmail.com:
>> I see examples using 2 parameters for moveTo and lineTo
>> 
>> Is there no drawline using 4 parameters drawline((x,y)(x,y))
> 
> I found a library at
> http://www.walterzorn.de/en/jsgraphics/jsgraphics_e.htm#download

Apparently Walter Zorn's code *still* ranges high among the worst script 
code that I have ever seen.

That said, his is a completely different approach there that does _not_ use 
the Canvas API but emulates it (poorly) with many HTML elements.  No wonder, 
it is hopelessly outdated (this particular “gem” was last updated in 2009), 
while Canvas is a new feature that is supposed to become a Web Standard with 
HTML5.

And do you really need an entire 24K library for something as simple as 
drawing a line?

  /* 99 bytes _extra_, newline counts as 1 */
  function drawLine (context, x1, y1, x2, y2)
  {
    context.moveTo(x1, y1);
    context.lineTo(x2, y2);
  }

  var canvas = document.getElementById("myCanvas");
  var context = canvas.getContext("2d");
  context.beginPath();
  drawLine(context, 23, 42, 36, 47);
  context.stroke();

or more runtime-efficient and object-oriented, for example (untested):

  /* 700 bytes _extra_, newline counts as 1 */
  function MyCanvasError (sMessage)
  {
    this.message = sMessage;
  }

  function MyCanvas (canvas)
  {
    if (typeof canvas.getContext != "function")
    {
      throw new TypeError("Canvas expected");
    }

    var context = canvas.getContext("2d");

    if (!context)
    {
      throw new MyCanvasError("Cannot get 2D context");
    }

    this.context = context;
  }

  /* So we can avoid augmenting a host object */
  MyCanvas.prototype.contextMethod = function (method) {
    var context = this.context;
    return context[method].apply(context, [].slice.call(arguments, 1));
  };

  MyCanvas.prototype.drawLine = function (x1, y1, x2, y2) {
    var context = this.context;
    context.moveTo(x1, y1);
    return context.lineTo(x2, y2);
  };

  var myCanvas = new MyCanvas(document.getElementById("myCanvas"));
  myCanvas.contextMethod("beginPath");
  myCanvas.drawLine(23, 42, 36, 47);
  myCanvas.contextMethod("stroke");

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20715

Fromjonas.thornvall@gmail.com
Date2013-07-19 09:15 -0700
Message-ID<6d54a079-1236-464a-aa4d-60d118f72411@googlegroups.com>
In reply to#20714
Den fredagen den 19:e juli 2013 kl. 13:09:46 UTC+2 skrev Thomas 'PointedEars' Lahn:
> jonas.thornvall@gmail.com wrote:
> 
> 
> 
> > jonas.t...@gmail.com:
> 
> >> I see examples using 2 parameters for moveTo and lineTo
> 
> >> 
> 
> >> Is there no drawline using 4 parameters drawline((x,y)(x,y))
> 
> > 
> 
> > I found a library at
> 
> > http://www.walterzorn.de/en/jsgraphics/jsgraphics_e.htm#download
> 
> 
> 
> Apparently Walter Zorn's code *still* ranges high among the worst script 
> 
> code that I have ever seen.
> 
> 
> 
> That said, his is a completely different approach there that does _not_ use 
> 
> the Canvas API but emulates it (poorly) with many HTML elements.  No wonder, 
> 
> it is hopelessly outdated (this particular “gem” was last updated in 2009), 
> 
> while Canvas is a new feature that is supposed to become a Web Standard with 
> 
> HTML5.
> 
> 
> 
> And do you really need an entire 24K library for something as simple as 
> 
> drawing a line?
> 
> 
> 
>   /* 99 bytes _extra_, newline counts as 1 */
> 
>   function drawLine (context, x1, y1, x2, y2)
> 
>   {
> 
>     context.moveTo(x1, y1);
> 
>     context.lineTo(x2, y2);
> 
>   }
> 
> 
> 
>   var canvas = document.getElementById("myCanvas");
> 
>   var context = canvas.getContext("2d");
> 
>   context.beginPath();
> 
>   drawLine(context, 23, 42, 36, 47);
> 
>   context.stroke();
> 
> 
> 
> or more runtime-efficient and object-oriented, for example (untested):
> 
> 
> 
>   /* 700 bytes _extra_, newline counts as 1 */
> 
>   function MyCanvasError (sMessage)
> 
>   {
> 
>     this.message = sMessage;
> 
>   }
> 
> 
> 
>   function MyCanvas (canvas)
> 
>   {
> 
>     if (typeof canvas.getContext != "function")
> 
>     {
> 
>       throw new TypeError("Canvas expected");
> 
>     }
> 
> 
> 
>     var context = canvas.getContext("2d");
> 
> 
> 
>     if (!context)
> 
>     {
> 
>       throw new MyCanvasError("Cannot get 2D context");
> 
>     }
> 
> 
> 
>     this.context = context;
> 
>   }
> 
> 
> 
>   /* So we can avoid augmenting a host object */
> 
>   MyCanvas.prototype.contextMethod = function (method) {
> 
>     var context = this.context;
> 
>     return context[method].apply(context, [].slice.call(arguments, 1));
> 
>   };
> 
> 
> 
>   MyCanvas.prototype.drawLine = function (x1, y1, x2, y2) {
> 
>     var context = this.context;
> 
>     context.moveTo(x1, y1);
> 
>     return context.lineTo(x2, y2);
> 
>   };
> 
> 
> 
>   var myCanvas = new MyCanvas(document.getElementById("myCanvas"));
> 
>   myCanvas.contextMethod("beginPath");
> 
>   myCanvas.drawLine(23, 42, 36, 47);
> 
>   myCanvas.contextMethod("stroke");
> 
> 
> 
> -- 
> 
> PointedEars
> 
> 
> 
> Twitter: @PointedEars2
> 
> Please do not Cc: me. / Bitte keine Kopien per E-Mail.

I am new to canvas, and i tried your code but i can not get any output.

Probably i use the code another way than you intended, if you can post a copy paste example, I can take it from there.

<!DOCTYPE html>
<head></head>
<html>
<script> 

function drawLine (context, x1, y1, x2, y2) 
  { 
    context.moveTo(x1, y1); 
    context.lineTo(x2, y2); 
  } 

  var canvas = document.getElementById("myCanvas"); 
  var context = canvas.getContext("2d"); 
  context.beginPath(); 
  drawLine(context, 23, 42, 36, 47); 
  setColor("#00ff00");
  context.stroke(); 

</script> 
<body>
</body>
</html>

[toc] | [prev] | [next] | [standalone]


#20716

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-19 20:08 +0200
Message-ID<14481436.aRB4Lr778n@PointedEars.de>
In reply to#20715
jonas.thornvall@gmail.com wrote:

[trimmed attribution novel]
> […] Thomas 'PointedEars' Lahn [wrote]:
>> [Full quote bloated with inserted intermittent empty quoted lines.]

For crying out loud…

*Please* do not use Google Groups for posting to Usenet, use a proper 
newsreader like Thunderbird, SeaMonkey.  And read the FAQ on quoting.

<http://jibbering.com/faq/#posting>
<http://PointedEars.de/faq#posting>
 
> I am new to canvas, and i tried your code but i can not get any output.
> 
> Probably i use the code another way than you intended, if you can post a
> copy paste example, I can take it from there.
> 
> <!DOCTYPE html>
> <head></head>
> <html>

Not Valid.  <http://validator.w3.org/>

> <script>
> 
> function drawLine (context, x1, y1, x2, y2)
>   { 
>     context.moveTo(x1, y1);
>     context.lineTo(x2, y2);
>   }
> 
>   var canvas = document.getElementById("myCanvas");

You need to have a “canvas” element with ID “myCanvas” in the document for 
this to work, like

  <canvas id="myCanvas"></canvas>

But the call to getElementById() must happen *after* the document was 
loaded; at least *after* the element in question was parsed (so that it is 
in the document tree).  Safest and cleanest is in a function or method that 
you call onload:

  <body onload="myObject.myMethod()">

>   var context = canvas.getContext("2d");
>   context.beginPath();
>   drawLine(context, 23, 42, 36, 47);
>   setColor("#00ff00");

Where is the setColor() function?

>   context.stroke();
> 
> </script>
> <body>
> </body>
> </html>

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20719

Fromjonas.thornvall@gmail.com
Date2013-07-19 12:15 -0700
Message-ID<26f9608c-9bc9-4b88-bed4-c13d2c63f72a@googlegroups.com>
In reply to#20716
Den fredagen den 19:e juli 2013 kl. 20:08:29 UTC+2 skrev Thomas 'PointedEars' Lahn:
> jonas.thornvall@gmail.com wrote:
> 
> 
> 
> [trimmed attribution novel]
> 
> > […] Thomas 'PointedEars' Lahn [wrote]:
> 
> >> [Full quote bloated with inserted intermittent empty quoted lines.]
> 
> 
> 
> For crying out loud…
> 
> 
> 
> *Please* do not use Google Groups for posting to Usenet, use a proper 
> 
> newsreader like Thunderbird, SeaMonkey.  And read the FAQ on quoting.
> 
> 
> 
> <http://jibbering.com/faq/#posting>
> 
> <http://PointedEars.de/faq#posting>
> 
>  
> 
> > I am new to canvas, and i tried your code but i can not get any output.
> 
> > 
> 
> > Probably i use the code another way than you intended, if you can post a
> 
> > copy paste example, I can take it from there.
> 
> > 
> 
> > <!DOCTYPE html>
> 
> > <head></head>
> 
> > <html>
> 
> 
> 
> Not Valid.  <http://validator.w3.org/>
> 
> 
> 
> > <script>
> 
> > 
> 
> > function drawLine (context, x1, y1, x2, y2)
> 
> >   { 
> 
> >     context.moveTo(x1, y1);
> 
> >     context.lineTo(x2, y2);
> 
> >   }
> 
> > 
> 
> >   var canvas = document.getElementById("myCanvas");
> 
> 
> 
> You need to have a “canvas” element with ID “myCanvas” in the document for 
> 
> this to work, like
> 
> 
> 
>   <canvas id="myCanvas"></canvas>
> 
> 
> 
> But the call to getElementById() must happen *after* the document was 
> 
> loaded; at least *after* the element in question was parsed (so that it is 
> 
> in the document tree).  Safest and cleanest is in a function or method that 
> 
> you call onload:
> 
> 
> 
>   <body onload="myObject.myMethod()">
> 
> 
> 
> >   var context = canvas.getContext("2d");
> 
> >   context.beginPath();
> 
> >   drawLine(context, 23, 42, 36, 47);
> 
> >   setColor("#00ff00");
> 
> 
> 
> Where is the setColor() function?
> 
> 
> 
> >   context.stroke();
> 
> > 
> 
> > </script>
> 
> > <body>
> 
> > </body>
> 
> > </html>
> 
> 
> 
> -- 
> 
> PointedEars
> 
> 
> 
> Twitter: @PointedEars2
> 
> Please do not Cc: me. / Bitte keine Kopien per E-Mail.

You just can't write the working seven line of coded needed rather you post some anal nitpicks, face it your code do work.

[toc] | [prev] | [next] | [standalone]


#20721

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-19 21:42 +0200
Message-ID<2139674.s9ONc4Y8a9@PointedEars.de>
In reply to#20719
jonas.thornvall@gmail.com wrote:

[Quotation fixed]

> […] Thomas 'PointedEars' Lahn:
>> jonas.thornvall@gmail.com wrote:
>> >   var canvas = document.getElementById("myCanvas");
>> 
>> You need to have a “canvas” element with ID “myCanvas” in the document
>> for this to work, like
>> 
>>   <canvas id="myCanvas"></canvas>
>> 
>> But the call to getElementById() must happen *after* the document was
>> loaded; at least *after* the element in question was parsed (so that it
>> is in the document tree).  Safest and cleanest is in a function or method
>> that you call onload: […]
> 
> You just can't write the working seven line of coded needed rather you
> post some anal nitpicks, face it your code do work.

Despite your posting in a hardly readable manner, I have given you a helpful 
answer.  If are unable to put one and one together, and blame your failures 
on the teacher instead, you are in the wrong place here.  FOAD.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20722

Fromjonas.thornvall@gmail.com
Date2013-07-19 12:44 -0700
Message-ID<c2d712d2-f3e8-41ff-b184-ff8813b54346@googlegroups.com>
In reply to#20721
Den fredagen den 19:e juli 2013 kl. 21:42:58 UTC+2 skrev Thomas 'PointedEars' Lahn:
> jonas.thornvall@gmail.com wrote:
> 
> 
> 
> [Quotation fixed]
> 
> 
> 
> > […] Thomas 'PointedEars' Lahn:
> 
> >> jonas.thornvall@gmail.com wrote:
> 
> >> >   var canvas = document.getElementById("myCanvas");
> 
> >> 
> 
> >> You need to have a “canvas” element with ID “myCanvas” in the document
> 
> >> for this to work, like
> 
> >> 
> 
> >>   <canvas id="myCanvas"></canvas>
> 
> >> 
> 
> >> But the call to getElementById() must happen *after* the document was
> 
> >> loaded; at least *after* the element in question was parsed (so that it
> 
> >> is in the document tree).  Safest and cleanest is in a function or method
> 
> >> that you call onload: […]
> 
> > 
> 
> > You just can't write the working seven line of coded needed rather you
> 
> > post some anal nitpicks, face it your code do work.
> 
> 
> 
> Despite your posting in a hardly readable manner, I have given you a helpful 
> 
> answer.  If are unable to put one and one together, and blame your failures 
> 
> on the teacher instead, you are in the wrong place here.  FOAD.
> 
> 
> 
> -- 
> 
> PointedEars
> 
> 
> 
> Twitter: @PointedEars2
> 
> Please do not Cc: me. / Bitte keine Kopien per E-Mail.

Fuck off lowIQ code monkey

[toc] | [prev] | [next] | [standalone]


#20723

Fromjonas.thornvall@gmail.com
Date2013-07-19 12:47 -0700
Message-ID<fd38192d-0caa-46cd-95ae-a45b5a17167c@googlegroups.com>
In reply to#20721
Den fredagen den 19:e juli 2013 kl. 21:42:58 UTC+2 skrev Thomas 'PointedEars' Lahn:
> jonas.thornvall@gmail.com wrote:
> 
> 
> 
> [Quotation fixed]
> 
> 
> 
> > […] Thomas 'PointedEars' Lahn:
> 
> >> jonas.thornvall@gmail.com wrote:
> 
> >> >   var canvas = document.getElementById("myCanvas");
> 
> >> 
> 
> >> You need to have a “canvas” element with ID “myCanvas” in the document
> 
> >> for this to work, like
> 
> >> 
> 
> >>   <canvas id="myCanvas"></canvas>
> 
> >> 
> 
> >> But the call to getElementById() must happen *after* the document was
> 
> >> loaded; at least *after* the element in question was parsed (so that it
> 
> >> is in the document tree).  Safest and cleanest is in a function or method
> 
> >> that you call onload: […]
> 
> > 
> 
> > You just can't write the working seven line of coded needed rather you
> 
> > post some anal nitpicks, face it your code do work.
> 
> 
> 
> Despite your posting in a hardly readable manner, I have given you a helpful 
> 
> answer.  If are unable to put one and one together, and blame your failures 
> 
> on the teacher instead, you are in the wrong place here.  FOAD.
> 
> 
> 
> -- 
> 
> PointedEars
> 
> 
> 
> Twitter: @PointedEars2
> 
> Please do not Cc: me. / Bitte keine Kopien per E-Mail.

I know your low IQ and we only need a test to do it, myself yeah i am one in a million.

[toc] | [prev] | [next] | [standalone]


#20724

Fromjonas.thornvall@gmail.com
Date2013-07-19 12:50 -0700
Message-ID<8b38222c-4128-48ab-8109-8a66c54cef51@googlegroups.com>
In reply to#20723
Den fredagen den 19:e juli 2013 kl. 21:47:29 UTC+2 skrev jonas.t...@gmail.com:
> Den fredagen den 19:e juli 2013 kl. 21:42:58 UTC+2 skrev Thomas 'PointedEars' Lahn:
> 
> > jonas.thornvall@gmail.com wrote:
> 
> > 
> 
> > 
> 
> > 
> 
> > [Quotation fixed]
> 
> > 
> 
> > 
> 
> > 
> 
> > > […] Thomas 'PointedEars' Lahn:
> 
> > 
> 
> > >> jonas.thornvall@gmail.com wrote:
> 
> > 
> 
> > >> >   var canvas = document.getElementById("myCanvas");
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> You need to have a “canvas” element with ID “myCanvas” in the document
> 
> > 
> 
> > >> for this to work, like
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >>   <canvas id="myCanvas"></canvas>
> 
> > 
> 
> > >> 
> 
> > 
> 
> > >> But the call to getElementById() must happen *after* the document was
> 
> > 
> 
> > >> loaded; at least *after* the element in question was parsed (so that it
> 
> > 
> 
> > >> is in the document tree).  Safest and cleanest is in a function or method
> 
> > 
> 
> > >> that you call onload: […]
> 
> > 
> 
> > > 
> 
> > 
> 
> > > You just can't write the working seven line of coded needed rather you
> 
> > 
> 
> > > post some anal nitpicks, face it your code do work.
> 
> > 
> 
> > 
> 
> > 
> 
> > Despite your posting in a hardly readable manner, I have given you a helpful 
> 
> > 
> 
> > answer.  If are unable to put one and one together, and blame your failures 
> 
> > 
> 
> > on the teacher instead, you are in the wrong place here.  FOAD.
> 
> > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > 
> 
> > PointedEars
> 
> > 
> 
> > 
> 
> > 
> 
> > Twitter: @PointedEars2
> 
> > 
> 
> > Please do not Cc: me. / Bitte keine Kopien per E-Mail.
> 
> 
> 
> I know your low IQ and we only need a test to do it, myself yeah i am one in a million.

Or maybe you prefer, you are official code monekey go back to anal nitpicks

[toc] | [prev] | [next] | [standalone]


#20717

FromMartin Leese <please@see.Web.for.e-mail.INVALID>
Date2013-07-19 13:00 -0600
Message-ID<ksc21c$vd5$1@dont-email.me>
In reply to#20715
jonas.thornvall@gmail.com wrote:

> I am new to canvas, and i tried your code but i can not get any output.
> 
> Probably i use the code another way than you intended, if you can post a copy paste example, I can take it from there.

In the book "JavaScript: The Definitive
Guide" the author, David Flanagan, devotes
most of Chapter 21 to graphics in a <canvas>.
If you can't afford to buy the book then
look at Example 21-4.  This is available
online at:
http://examples.oreilly.com/9780596805531/

-- 
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/

[toc] | [prev] | [next] | [standalone]


#20718

Fromjonas.thornvall@gmail.com
Date2013-07-19 12:06 -0700
Message-ID<5b89005c-5938-4e1c-87bb-938d60c8949b@googlegroups.com>
In reply to#20717
Den fredagen den 19:e juli 2013 kl. 21:00:36 UTC+2 skrev Martin Leese:
> jonas.thornvall@gmail.com wrote:
> 
> 
> 
> > I am new to canvas, and i tried your code but i can not get any output.
> 
> > 
> 
> > Probably i use the code another way than you intended, if you can post a copy paste example, I can take it from there.
> 
> 
> 
> In the book "JavaScript: The Definitive
> 
> Guide" the author, David Flanagan, devotes
> 
> most of Chapter 21 to graphics in a <canvas>.
> 
> If you can't afford to buy the book then
> 
> look at Example 21-4.  This is available
> 
> online at:
> 
> http://examples.oreilly.com/9780596805531/
> 
> 
> 
> -- 
> 
> Regards,
> 
> Martin Leese
> 
> E-mail: please@see.Web.for.e-mail.INVALID
> 
> Web: http://members.tripod.com/martin_leese/

I have no idea about what it is about you anal code monkeys that annoy the hell out of me, but if you spent less time butpicking eachothers ass, and spent a minute to actually post the 7 line of code request i did, maybe i come forward as more appreciating.

[toc] | [prev] | [next] | [standalone]


#20720

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-19 21:34 +0200
Message-ID<5342216.YL0mnvYk6P@PointedEars.de>
In reply to#20718
jonas.thornvall@gmail.com wrote:

> Den fredagen den 19:e juli 2013 kl. 21:00:36 UTC+2 skrev Martin Leese:
>> jonas.thornvall@gmail.com wrote:
>> 
>> 
>> 
>> > I am new to canvas, and i tried your code but i can not get any output.
>> 
>> > 
>> 
>> > Probably i use the code another way than you intended, if you can post
>> > a copy paste example, I can take it from there.
>> 
>> 
>> 
>> In the book "JavaScript: The Definitive
>> 
>> Guide" the author, David Flanagan, devotes
>> 
>> most of Chapter 21 to graphics in a <canvas>.
>> 
>> If you can't afford to buy the book then
>> 
>> look at Example 21-4.  This is available
>> 
>> online at:
>> 
>> http://examples.oreilly.com/9780596805531/
>> […]

Full quote with interleaved empty quote lines again – are you begging for 
paying my health insurance against eye cancer?
 
> I have no idea about what it is about you anal code monkeys that annoy the
                                            ^^^^
> hell out of me, but if you spent less time butpicking eachothers ass, and
                                             ^^^^^^^^^^            ^^^
> spent a minute to actually post the 7 line of code request i did, 

Look who is not past *his* “anal stage” yet.

> maybe i come forward as more appreciating.

You are under the grave misconception that people subscribed to this 
newsgroup need people like you to fill their sorry, unreal, unemployed life 
with meaning.

<http://www.catb.org/~esr/faqs/smart-questions.html>

Score adjusted

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20725

FromTim Streater <timstreater@greenbee.net>
Date2013-07-19 21:17 +0100
Message-ID<timstreater-932F4D.21172419072013@news.individual.net>
In reply to#20718
In article <5b89005c-5938-4e1c-87bb-938d60c8949b@googlegroups.com>,
 jonas.thornvall@gmail.com wrote:

> I have no idea about what it is about you anal code monkeys that annoy the 
> hell out of me, but if you spent less time butpicking eachothers ass, and 
> spent a minute to actually post the 7 line of code request i did, maybe i 
> come forward as more appreciating.

Christ, a bigger arsehole than PointyHead. I didn't think it was 
possible.

Pointy gave you some clues about why your code was not gonna work. Any 
reason you couldn't read that and apply it? Why should he or anyone else 
give you a complete solution; you aint gonna learn anything that way. 
Now shove off.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#20726

Fromjonas.thornvall@gmail.com
Date2013-07-19 13:20 -0700
Message-ID<df7cb19e-331e-49ec-a9e0-12715ce11262@googlegroups.com>
In reply to#20725
Den fredagen den 19:e juli 2013 kl. 22:17:24 UTC+2 skrev Tim Streater:
> In article <5b89005c-5938-4e1c-87bb-938d60c8949b@googlegroups.com>,
> 
>  jonas.thornvall@gmail.com wrote:
> 
> 
> 
> > I have no idea about what it is about you anal code monkeys that annoy the 
> 
> > hell out of me, but if you spent less time butpicking eachothers ass, and 
> 
> > spent a minute to actually post the 7 line of code request i did, maybe i 
> 
> > come forward as more appreciating.
> 
> 
> 
> Christ, a bigger arsehole than PointyHead. I didn't think it was 
> 
> possible.
> 
> 
> 
> Pointy gave you some clues about why your code was not gonna work. Any 
> 
> reason you couldn't read that and apply it? Why should he or anyone else 
> 
> give you a complete solution; you aint gonna learn anything that way. 
> 
> Now shove off.
> 
> 
> 
> -- 
> 
> Tim
> 
> 
> 
> "That excessive bail ought not to be required, nor excessive fines imposed,
> 
> nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

As i said fuck off lowIQ code monkey, either you can write the codesnippet or you can't. I do not buy fucking halffabricates. So do not bother.

[toc] | [prev] | [next] | [standalone]


#20731

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2013-07-19 13:32 -0700
Message-ID<bacc6099-88fc-4702-883b-cfb728b867e3@googlegroups.com>
In reply to#20726
On Friday, July 19, 2013 3:20:57 PM UTC-5, jonas.t...@gmail.com wrote:
> As i said fuck off lowIQ code monkey, either you can write the codesnippet or you can't. I do not buy fucking halffabricates. So do not bother.

"I do not enlighten those who are not eager to learn,
nor arouse those who are not anxious
to give an explanation themselves.
If I have presented one corner of the square
and they cannot come back to me with the other three,
I should not go over the points again." -- Confucius

PE's code works fine. What is missing is the requisite knowledge to utilize it. If the aforementioned 7 lines or so were given, I suspect they would not help much. Please do utilize the resources linked to by Martin Honnen earlier and others

[toc] | [prev] | [next] | [standalone]


#20732

Fromjonas.thornvall@gmail.com
Date2013-07-19 13:39 -0700
Message-ID<0309b30a-10e8-4c9e-b278-61f8a28992d7@googlegroups.com>
In reply to#20731
Den fredagen den 19:e juli 2013 kl. 22:32:29 UTC+2 skrev Michael Haufe (TNO):
> On Friday, July 19, 2013 3:20:57 PM UTC-5, jonas.t...@gmail.com wrote:
> 
> > As i said fuck off lowIQ code monkey, either you can write the codesnippet or you can't. I do not buy fucking halffabricates. So do not bother.
> 
> 
> 
> "I do not enlighten those who are not eager to learn,
> 
> nor arouse those who are not anxious
> 
> to give an explanation themselves.
> 
> If I have presented one corner of the square
> 
> and they cannot come back to me with the other three,
> 
> I should not go over the points again." -- Confucius
> 
> 
> 
> PE's code works fine. What is missing is the requisite knowledge to utilize it. If the aforementioned 7 lines or so were given, I suspect they would not help much. Please do utilize the resources linked to by Martin Honnen earlier and others

Honestly i do not think you are the right man to quote Confucius, maybe you should label it confusius instead. 

You still do realise that you can fit the HTML tags on a line and end up with 9 line of codes, if you just could get it working?

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web