Re: [Gnome-print] information about printing a grid



On 31 Jul 2001 17:50:52 +0100, talus wrote:

> int gnome_print_newpath (GnomePrintContext *pc);
> int gnome_print_moveto (GnomePrintContext *pc, double x, double y);
> int gnome_print_lineto (GnomePrintContext *pc, double x, double y);

> i simply don't know what most of this functions is supose to do and how 
> they work?
>
> I get a printing function with text formatted and  with font of my 
> choice. Now i want to Draw a grid to show information inside can someone 
> tellme how can i do this because I'm no wizard to guess wich function to 
> use and how to use it is there any kind of documentation that i could use?
> thanks

Ok, the gnome print API is modeled after Postscript. So I suggest that
you find a good postscript reference on how to use them. So if you have
in postcript the following commands to draw a rectangle :

100 100 moveto
100 300 lineto
200 300 lineto
200 100 lineto
closepath
stroke
show

You will use in gnome-print :

pc = gnome_print_context_new ();
gnome_print_moveto (pc, 100, 100);
gnome_print_lineto (pc, 100, 300);
gnome_print_lineto (pc, 200, 300);
gnome_print_lineto (pc, 200, 100);
gnome_print_closepath (pc);
gnome_print_stroke (pc);
gnome_print_show (pc);

etc ..

There are a lot of unix aps that generate postscript code for printing
output that is one of the reasons the API is based on postscript. I
started some time ago writing a small gnome-print tutorial but i have
not had the time to work on it. This has been requested a lot but nobody
has done it yet.

regards,
CHema
> 
> 
> _______________________________________________
> Gnome-print maillist  -  Gnome-print@ximian.com
> http://lists.ximian.com/mailman/listinfo/gnome-print
> 






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]