• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rép: Maths Calculation Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép: Maths Calculation Problem


  • Subject: Rép: Maths Calculation Problem
  • From: KOENIG Yvan <email@hidden>
  • Date: Fri, 14 Nov 2008 22:36:10 +0100


Le 14 nov. 2008 à 21:59, Mark J. Reed a écrit :

On Fri, Nov 14, 2008 at 3:29 PM, Simon Topliss <email@hidden> wrote:
Illustrator's co-ordinates are based on postscript co-ordinates. Bottom-left is always the origin.


In that case, while my handler will still function, the nomenclature is backwards. This one is correct for the Illustrator origin placement.

Hello Mark.

This is the second message in which you wrote about a handler but I never saw such beast in my mailbox.

Am'I the only one which doesn' t received it ?

The code sent in my late message works with rectangles like those returned from AppleWorks.

I edited it to take care of the structure of those returned from Adobe programs.

(* rectangles like AppleWorks's ones *)
set intersect to my areThereIntersecting({500.0, 500.0, 700.0, 700.0}, {550.0, 550.0, 650.0, 650.0})
log intersect
set intersect to my areThereIntersecting({500.0, 500.0, 700.0, 700.0}, {750.0, 750.0, 800.0, 800.0})
log intersect
set intersect to my areThereIntersecting({500.0, 500.0, 700.0, 700.0}, {650.0, 650.0, 800.0, 800.0})
log intersect


(* S.T. rectangle *)
set intersect to my areThereIntersecting({523.0, 520.0, 749.0, 465.0}, {500.0, 570.0, 737.0, 515.0})
log intersect


on areThereIntersecting({X11, Y11, X12, Y12}, {X21, Y21, X22, Y22})
if Y12 < Y11 then
set {X11, Y11, X12, Y12} to {X11, Y12, X12, Y11}
set {X21, Y21, X22, Y22} to {X21, Y22, X22, Y21}
end if
return (((X21 > X11) and (X21 < X12)) or ((X22 > X11) and (X22 < X12))) and (((Y21 > Y11) and (Y21 < Y12)) or ((Y22 > Y11) and (Y22 < Y12)))
end areThereIntersecting


Yvan KOENIG (from FRANCE vendredi 14 novembre 2008 22:12:06)

I sent this message to Mark when I wanted to send it to this forum :-(

Yvan KOENIG (from FRANCE vendredi 14 novembre 2008 22:36:06)





_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Fwd: Maths Calculation Problem
  • Next by Date: Sturm, Lewis is out of the office.
  • Previous by thread: Re: [Finder] Menu localization difference on Leopard vs Tiger
  • Next by thread: Sturm, Lewis is out of the office.
  • Index(es):
    • Date
    • Thread