🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
2 messages
2 total messages Started by David Rochberg Fri, 07 Aug 1992 03:34
Applying aribtrary transformations to a View's CTM
#479
Author: David Rochberg
Date: Fri, 07 Aug 1992 03:34
29 lines
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
Re: Applying aribtrary transformations to a View's CTM
#480
Author: David Rochberg
Date: Fri, 07 Aug 1992 05:30
16 lines
1083 bytes
While I was explaining to myself why it was impossible to generate an
odd isometry with scale and rotate, I realized that [self scale:1:-1]
is a reflection, and so one can get odd isometries, like reflection
about the diagonal.  
[self rotate:45];
[self scale:1:-1];
[self rotate:-45];
exchanges the view coordinate axes.  

However, I'd still like to know if it's possible to do this more
directly.

			emabarrased at having overlooked the obvious
			but still curious,
			david
			
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads