Scripter/Images: Difference between revisions
Jump to navigation
Jump to search
m (Border script) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Scripting Index}} | |||
Haven't got this wiki thing psyched out yet, but here is a script to put an 8pt border 20 pts in on a A4 page. Modifyfying it gives all sorts of borders | Haven't got this wiki thing psyched out yet, but here is a script to put an 8pt border 20 pts in on a A4 page. Modifyfying it gives all sorts of borders | ||
--------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
Revision as of 20:54, 5 February 2005
Haven't got this wiki thing psyched out yet, but here is a script to put an 8pt border 20 pts in on a A4 page. Modifyfying it gives all sorts of borders
from scribus import *
if NewDoc(Paper_A4, (10, 10, 10, 10), Portrait, 1, UNIT_POINTS, NoFacingPages, FirstPageRight):
spx=20 # x co-ord Start point spy=20 # y co-ord Start point wth=595 # A4 width in points dph=842 # Depth of frame - adjust to suit a=8 # Line width b="Black" # add other colors as required b1="Blue" w="White"
h = CreateRect(spx,spy,wth-2*spx,dph-2*spy) setCornerRadius(20, h) setLineWidth(8, h) setFillColor(w, h) setLineColor(b, h)
SaveDocAs("Border_2.sla")
When I last tried setCornerRadius didn't work, but they'll sort that out eventually.