[RPL/2] How to draw anything ?

BERTRAND Joël joel.bertrand at systella.fr
Lun 16 Juil 18:22:22 CEST 2007


DEMAINE Benoit-Pierre wrote:
> BERTRAND Joël wrote:
>> DEMAINE Benoit-Pierre wrote:
>>> Before asking, I had a glance at ps.bz2 on the web site (pages are
>>> white), and to archives of ML I kept locally.
>>>
>>> How to draw anything on screen ?
>>> draw+persist do not open any GUI.
>> 'X' steq draw // Y=X
>> { "droite.eps" "postscript eps enhanced monochrome dashed" } LCD->
>> // create an EPS file with name: "droite.eps"
> 
> running it manually in CLI is ok; running attached script produces:
> 
> dhp at moon_gen_2:~/documents/programmation/rpl$ ./ewample_draw_graphic.rpl
> +++RPL/2 version 4.00pre8w (Tuesday 07/10/07, 23:57:24 CEST)
> +++Copyright (C) 1989 to 2006, 2007 BERTRAND Joël
> +++Fatal : Any entry point
> dhp at moon_gen_2:~/documents/programmation/rpl$

	Normal. A RPL/2 script must have one entry point (like main() in C). 
Main entry point is the first function of script and has no special name.

#!/usr/local/bin/rpl -sc

PROGRAM
<<
	'X' steq draw // Y=X
	{ "droite.eps" "postscript eps enhanced monochrome dashed" }
	LCD->
 >>

> Any way, nothing come out; no popup, no extra window.

	Do you have gnuplot on your system ?

> I attach the created eps (1195 bytes, content is white).
> 
>>> LCD-> creates empty files
>> 	Maybe gnuplot support is not built.
> 
> I have installed gv and redo all steps above, same result.

	Not gv, gnuplot.

> After checking deep logs, rpl was build with gnuplot.

	OK. Try :

TEST
<<
	'X' steq draw persist // Y=X
	{ "droite.eps" "postscript eps enhanced monochrome dashed" }
	LCD->
 >>


>>> A stupid example based on y=x would suffice for today. I want:
>>> - live draw on screen
>>> - possibility to store picture on HDD (PS/PNG/JPG) from the window on
>>> screen (I dont think PR1 will do).
>> 	PR1 only prints data in postscript buffer and you have to call print to 
>> launch gv.
> 
> Logs mention:
> 
> checking for gv... no
> configure: WARNING: Cannot find gv! You may install it.
> Download at http://ftp.lip6.fr/
> 
> is this the problem ?

	No, gv is used to display PostScript output (see PRINT).

	Regards,

	JKB


Plus d'informations sur la liste de diffusion RPL2