Hi Alex,

very nice demo indeed, especially the use of plio protocol to do stuff
in the browser;-)

Another way of achieving the same result without any need for javascript
would be using SVG.  It works very well across browsers nowadays.
Canvas could be an iframe with a refresh rate if required and SVG could
be inlined in the HTML, generated in a similar way as the usual PicoLisp
generated HTML.  As an added bonus, SVG could contain links which could
trigger picolisp actions without the need for calculating positions on
server side (because the browser would do this work for us), should the
users wish to inspect a point in the demo graph.

Cheers,

Tomas

"Jon Kleiser" <jon.klei...@usit.uio.no> writes:

> Hi Alex,
>
>> Hi Jon,
>>
>>> > 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
>>
>> Ah, right! Yes, that's indeed a kind of X-axis :)
>>
>>
>>> 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.
>>
>> OK. So this could be written as (csTranslate "16.5" "16.5") in PicoLisp?
>
> Yes, I guess that should work.
>
>> Another possibility would be to set (csLineWidth "0.5"), right?
>>
>> ?? Alex
>
> I would have to try that csLineWidth before I can say if it works. I guess
> it could make the color of the line somewhat paler than what you intended.
>
> /Jon
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to