[Scribus] Adjust script (trait_de_coupe.py)
Louis Desjardins
louis_desjardins
Wed Oct 3 16:11:44 CEST 2007
myyers a ?crit :
> Hi,
>
> as recommended in this mailing list I use the script trait_de_coupe.py
> to insert crop marks into a pdf. That's fine but I have to adjust the
> position of the marks (which is no problem). I would like to change the
> length of the crop marks either which is a problem.
> The script looks like this:
>
> --8<---------------cut here---------------start------------->8---
> [...]
> def main():
> userUnit = getUnit()
> setUnit(1)
> x,y = getPosition()
> l,h = getSize()
> t1 = createLine(x, y-4, x, y-9)
> setLineWidth(0.6, t1)
> t2 = createLine(x+l, y-4, x+l, y-9)
> setLineWidth(0.6, t2)
> t3 = createLine(x, y+9+h, x, y+4+h)
> setLineWidth(0.6, t3)
> t4 = createLine(x+l, y+9+h, x+l, y+4+h)
> setLineWidth(0.6, t4)
> t5 = createLine(x-4, y, x-9, y)
> setLineWidth(0.6, t5)
> t6 = createLine(x-4, y+h, x-9, y+h)
> setLineWidth(0.6, t6)
> t7 = createLine(x+l+4, y+h, x+l+9, y+h)
> setLineWidth(0.6, t7)
> t7 = createLine(x+l+4, y, x+l+9, y)
> setLineWidth(0.6, t7)
> deselectAll()
> setUnit(userUnit)
> [...]
> --8<---------------cut here---------------end--------------->8---
>
> Changing the value of the x,y coordinates changes the position of
> the marks, okay. I assumed inserting a new value for 'setLineWidth'
> would define a new length for the marks but it changes nothing.
>
> Any hints?
Hi,
My answer is only a guess. I really have never done a script but looking
at this makes me think of this:
1. The setLineWidth must refer to the line thickness, imho.
2. The length of the mark must be achieved by the x or y start and end
values, depending on the line being vertical or horizontal. So, for instance
t1 = createLine(x, y-4, x, y-9)
defines the length of the mark, between -4 and -9 and all the crop marks
are set at the same length as far as I understand.
I wonder how come we have 2 t7 and no t8 ?
Again, only a guess. I maybe completely wrong!
Nonetheless, it is fun trying to figure this out!
Louis
>
> henry
> _______________________________________________
> Scribus mailing list
> Scribus at nashi.altmuehlnet.de
> http://nashi.altmuehlnet.de/mailman/listinfo/scribus
>
--
Louis Desjardins
Mardigrafe inc.
Graphisme et impression ?cologique
T 514 934 1353
F 514 934 3698
www.mardigrafe.com
More information about the scribus
mailing list