[26 May 2010] Printing with hollywood?

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

[26 May 2010] Printing with hollywood?

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on 26 May 2010 00:49:15 +0200

Hi Andreas! Any project to made Hollywood capable to print? Just to know :)

GOOD WORK!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[28 May 2010] Re: Printing with hollywood?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 28 May 2010 10:58:21 +0200
Hi Andreas! Any project to made Hollywood capable to print? Just to know :)
No, that's not planned, sorry :)
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

[29 May 2010] Re: Printing with hollywood?

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 29 May 2010 11:43:54 +0200

Hello Simone!

I think a solution would be to create a library of scripts (similar to Fabio's SCUIlib) to generate postscipt output. It is quite simple to create ps forms for printing needs. I am currently not interested in doing something like that, however I made it in Amos in the past. If you want i could send you the sources. Maybe it could be useful to adapt it to work in Hollywood.

The ps file then you could send to a ghostscript interpreter (like AmiGS on OS4) and the user can look a preview and print it.

Maybe the only obstacle is to reach image data directly in Hollywood (ReadPixel() would be very slow for large images).

Andreas what do you think about let the user touch the memory area of a brush, sprite, etc?

Here is an sample extract of the mentioned Amos source. I think it is quite understandable:

Code: Select all

Procedure POSTSCRIPT_MAKE
'       Opens the temporary postscript file
'       Call this routine first!
        Open Out 3,"T:temp_ps"
End Proc [3]

Procedure POSTSCRIPT_HEADER[c$,y$,t$,f]
'       General A/4 header and footer
        Print#f,"% Header for SymBase System"
        Print#f,"/date ("+Cd Date$(Current Date)+") def"
        Print#f,"/year ("+y$+") def"
        Print#f,"/customer ("+c$+") def"
        Print#f,"/title ("+t$+") def"
        Print#f,"13 mm hline"
        Print#f,"14 mm hline"
        Print#f,"290 mm box"
        Print#f,"usefont"
        Print#f,"10 mm date alignright date show"
        Print#f,"295 mm alignleft customer show"
        Print#f,"295 mm year alignright year show"
        Print#f,"/fontsize 18 def"
        Print#f,"usefont"
        Print#f,"290 mm title aligncenter title show"
        Print#f,"% End of header"
End Proc

Procedure POSTSCRIPT_PAGE_NUMBER[f,n]
        Print#f,"gsave 13 mm ("+str$(n)+") aligncenter
("+str$(n)+") show grestore"
End Proc

Procedure POSTSCRIPT_SZLA_ADAT1[f]
        Print#f,"% Begin <szamla adatok>"
        Print#f,"/rborder 100 mm def"
        Print#f,"/ypos 250 mm def"
        Print#f,"/string (Szamla kibocsatoja:) def printyl"
        Print#f,"/string (Kelt:) def printyl"
        Print#f,"/string (Szamla sorszama:) def printyl"
        Print#f,"/string (tipusa:) def printyl"
        Print#f,"/string (Brutto vegosszeg:) def printyl"
        Print#f,"/lborder 100 mm def"
        Print#f,"/ypos 250 mm def"
End Proc

Procedure POSTSCRIPT_TABLE_HEAD[f,h$,c]
'       Set table column header text for the previously
setted table.(POSTSCRIPT_SETTABLE)
        Print#f,"("+h$+") "+Str$(c)+" 1 lm ypos tableprintc"
End Proc

Procedure POSTSCRIPT_PRINTY[f,a$]
        Print#f,"/string ("+a$+") def printy"
End Proc

Procedure POSTSCRIPT_SETTABLE[f,r,c,y,c$]
'       Draws a table with:
'       f - file from POSTSCRIPT_MAKE
'       r - rows
'       c - columns
'       y - vertical position
        Print#f,"/ypos"+str$(y)+" mm def"
        Print#f,"/rborder rm def"
        Print#f,"/lborder lm def"
        Print#f,"/tabler"+str$(r)+" def"
        Print#f,"/tablec"+str$(c)+" def"
        Print#f,".1 setlinewidth"
        Print#f,"/carray ["+c$+"] def"
        Print#f,"lm ypos newtabledraw"
End Proc 
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

[29 May 2010] Re: Printing with hollywood?

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 29 May 2010 11:43:54 +0200

Hello Simone!

I think a solution would be to create a library of scripts (similar to Fabio's SCUIlib) to generate postscipt output. It is quite simple to create ps forms for printing needs. I am currently not interested in doing something like that, however I made it in Amos in the past. If you want i could send you the sources. Maybe it could be useful to adapt it to work in Hollywood.

The ps file then you could send to a ghostscript interpreter (like AmiGS on OS4) and the user can look a preview and print it.

Maybe the only obstacle is to reach image data directly in Hollywood (ReadPixel() would be very slow for large images).

Andreas what do you think about let the user touch the memory area of a brush, sprite, etc?
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

[30 May 2010] Re: Printing with hollywood?

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on 30 May 2010 12:11:59 +0200

Hi! nice idea! ATM I'm too busy to add (multitasking)Thumber functionality to LoView so I've no time for that, but maybe i future I'll like to look at your soures... Thanks! :) I've also thought to send the images/text to print to some sort of external print device or spooler, but I dont know if it was really possible on AmigaOS...

See you next time
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[02 Jun 2010] Re: Re: Printing with hollywood?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 02 Jun 2010 23:19:39 +0200
Hello Simone!

I think a solution would be to create a library of scripts (similar to Fabio's SCUIlib) to generate postscipt output. It is quite simple to create ps forms for printing needs. I am currently not interested in doing something like that, however I made it in Amos in the past. If you want i could send you the sources. Maybe it could be useful to adapt it to work in Hollywood.

The ps file then you could send to a ghostscript interpreter (like AmiGS on OS4) and the user can look a preview and print it.

Maybe the only obstacle is to reach image data directly in Hollywood (ReadPixel() would be very slow for large images).

Andreas what do you think about let the user touch the memory area of a brush, sprite, etc?
Well, direct memory access will definitely not come because that violates Hollywood's sandbox concept. However, I might do something like

CreateBrushFromArray(): convert a table of A x B RGB color values into a brush

GetBrushAsArray(): return brush as a table of A x B RGB color values

This would allow you to convert tables into brushes and vice versa. However, modifying these tables will be very slow because you will have to deal with a lot of pixels. 640 x 480 would already be 307200 pixels...
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

[02 Jun 2010] Re: Printing with hollywood?

Post by Tuxedo »

Note: This is an archived post that was originally sent to the Hollywood mailing list on 02 Jun 2010 23:55:03 +0200

Ciao Andreas, And what about a direct brush manipulation command? Like the TransformBrush() command but more powerfull...

:D
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
lazi
Posts: 625
Joined: Thu Feb 24, 2011 11:08 pm

[03 Jun 2010] Re: Printing with hollywood?

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 03 Jun 2010 00:08:31 +0200

Hello Andreas
Well, direct memory access will definitely not come because that violates Hollywood's sandbox concept. However, I might do something like

CreateBrushFromArray(): convert a table of A x B RGB color values into a brush

GetBrushAsArray(): return brush as a table of A x B RGB color values
What about handle as memory blocks. We have peek and poke already for them.

It would be nice to find a way for processing images. I am playing with the idea to create a decent gfx program on hollywood. The layer system is so powerful for such task. Maybe the plugin system would solve that. Do you still plan to make is public sometime?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[03 Jun 2010] Re: Re: Printing with hollywood?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 03 Jun 2010 22:17:36 +0200
What about handle as memory blocks. We have peek and poke already for them.
That won't be much faster than doing the ReadPixel()/WritePixel() thing. The general problem is that the Hollywood VM is not really fast enough for these kinds of operations. If you need to iterate over some millions of pixels, it will take some time, even if you are on a 3Ghz PC. AFAICS, the fastest solution would be the pixel table solution described above because that does not involve any API calls. However, when using this approach one has to be *very* careful to set obsolete tables to Nil because otherwise memory usage will increase considerably.
It would be nice to find a way for processing images. I am playing with the idea to create a decent gfx program on hollywood. The layer system is so powerful for such task. Maybe the plugin system would solve that. Do you still plan to make is public sometime?
Yes, but it's not having a high priority right now. Sooner or later it is planned though.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[03 Jun 2010] Re: Re: Printing with hollywood?

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 03 Jun 2010 22:19:56 +0200
Ciao Andreas, And what about a direct brush manipulation command? Like the TransformBrush() command but more powerfull...
What exactly are you missing? :-)
Locked