Article View: comp.sys.next.programmer
Article #479Applying aribtrary transformations to a View's CTM
From: David Rochberg
Date: Fri, 07 Aug 1992 03:34
Date: Fri, 07 Aug 1992 03:34
29 lines
1552 bytes
1552 bytes
I would like to exchange the coordinate axes of a view. To do this before drawing is simple. I just call a pswrap that does [0 1 1 0 0 0] concat and the drawing is done in a transposed coordinate system. However, I want to exchange the coordinates in the *View's* CTM. This way, coordinates for drawSelf:: and mouse coordinates would be automatically transposed and I could use the exact same code in both the transposed and untransposed states. This transform cannot be constructed from a sequence of -rotate: and -translate::'s, and setFlipped does not treat the coordinate system kindly when it's called late in the scheme of things, so I must use an arbitrary transform. How can I do this? I've tried cheating in two ways: 1) Putting coordinate transforms in an initGState method. 2) Putting them into a PSgrestore() transform coords PSgsave() Both cases failed miserably (as was to be expected). Thanks in advance for any leads you might have! My fast-approaching deadline thanks you too. -david
Technical Details
Message-ID:
<1992Aug7.073500.14435@cs.yale.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!darwin.sura.net!jvnc.net!yale.edu!cs.yale.edu!rochberg-davidShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!darwin.sura.net!jvnc.net!yale.edu!cs.yale.edu!rochberg-david From: rochberg-david@CS.YALE.EDU (David Rochberg) Subject: Applying aribtrary transformations to a View's CTM Message-ID: <1992Aug7.073500.14435@cs.yale.edu> Sender: news@cs.yale.edu (Usenet News) Nntp-Posting-Host: toad.zoo2.cs.yale.edu Organization: Yale University Undergrad Computer Science Date: Fri, 7 Aug 1992 03:34:45 GMT Lines: 29