Hi Alex,

> Hi Jon,
>
> thanks for the feedback! :)
>
>
>> A couple of questions:
>> 1) Will your canvas library allow the use of non-integer values? The
>
> Yes. JavaScript doesn't really care about the type of an argument, so
> you should be able to pass a string like "0.5", or (format Number 3), or
> whatever.
>
>
>> reason I ask is that I notice that the X-axis in your demo appears,
>> at least on my screen, to be two pixels thick (and slightly pale).
>
> Do you mean the box around the whole canvas (there is no dedicated
> X-axis)? In fact, the box is not part of the canvas itself, but appears
> because of the CSS style "canvas {border: 1px solid}".

No, I mean the redish horizontal line in the middle of the canvas. You can
see an example of sharp (1px) horizontal and vertical lines if you go to
my
<http://folk.uio.no/jkleiser/pico/emuLisp/console.html>
and evaluate e.g. '(1 (2 3)) - then look in the canvas to the right. What
I do in this console.html is this:
ctx.translate(16.5, 16.5);
It's the ".5" that does the trick.

/Jon

>> You probably will have to offset it (vertically) by 0.5 to get a
>> really sharp one-pixel line. I believe this is how canvas works for
>> horizontal and vertical lines.
>
> Yes. In other cases (not in that demo) I saw that drawing a rectangle
> with the size of the canvas itself, i.e.
>
>    (csClearRect 0 0 *DX *DY)
>    (csStrokeRect 0 0 *DX *DY)
>
> displays the Rectangle with only half the line-width, because the other
> half is outside the canvas drawable area.
..
>> Anyway, it's nice to see some new and interesting stuff here. Have a
>> nice weekend, everybody!
>
> Thanks! You too!
>
> ?? Alex

-- 
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe

Reply via email to