B
Bill H
I have been trying to figure out how to do this in perl for weeks and
justcan't seem to fingure it out. I can see it in my mind how it
should work.
The problem I have is this. I have a flash interface that sends perl
some image coordinates that perl then uses to make pdf's using
pdf:api2. In flash I use the standard coordinate system:
0,0------------------> X
|
|
|
v
Y
(ie x,y is starts at top left corner). So I will send the perl program
a image coordinate in the format of x,y,width,height.
Now on the prl side, making the pdf the coordinate system is:
Y
|
|
|
|
0,0 ------------------> X
(ie x,y starts at bottom left corner) and I need to translate the
flash coordinates to the perl / pdf coordinates.
So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
(using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y = 72,72
in flash and width = 72, and height = 72) then my x,y coordinates in
perl whould be 72,540.
The problem I have is, trying to come up with a algorythm that will
translate the one set of coordinates into the other.
I hope I am making sense.
Bill H
justcan't seem to fingure it out. I can see it in my mind how it
should work.
The problem I have is this. I have a flash interface that sends perl
some image coordinates that perl then uses to make pdf's using
pdf:api2. In flash I use the standard coordinate system:
0,0------------------> X
|
|
|
v
Y
(ie x,y is starts at top left corner). So I will send the perl program
a image coordinate in the format of x,y,width,height.
Now on the prl side, making the pdf the coordinate system is:
Y
|
|
|
|
0,0 ------------------> X
(ie x,y starts at bottom left corner) and I need to translate the
flash coordinates to the perl / pdf coordinates.
So, if I have a page that is 5 1/2" x 8 1/2" inches, or 396 x 612
(using 72dpi) and I am placing a 1" x 1" image at 1" x 1" (x,y = 72,72
in flash and width = 72, and height = 72) then my x,y coordinates in
perl whould be 72,540.
The problem I have is, trying to come up with a algorythm that will
translate the one set of coordinates into the other.
I hope I am making sense.
Bill H