Hi Andreas! Any project to made Hollywood capable to print? Just to know
GOOD WORK!
No, that's not planned, sorryHi Andreas! Any project to made Hollywood capable to print? Just to know![]()
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
Well, direct memory access will definitely not come because that violates Hollywood's sandbox concept. However, I might do something likeHello 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?
What about handle as memory blocks. We have peek and poke already for them.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
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.What about handle as memory blocks. We have peek and poke already for them.
Yes, but it's not having a high priority right now. Sooner or later it is planned though.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?
What exactly are you missing?Ciao Andreas, And what about a direct brush manipulation command? Like the TransformBrush() command but more powerfull...