🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #360

Re: push_transform, transform, pop_transform

#360
From: Mark Linton
Date: Fri, 17 Apr 1992 19:08
21 lines
1323 bytes
In article <1992Apr16.131205.10032@fwi.uva.nl>, koelma@fwi.uva.nl (Dennis Koelma) writes:
|> Can anyone point me to a description of these member-function of Canvas ?
|> It seems that the sequence "push_transfrom, transform(matrix)" could
|> be simplified to "push_transform(matrix)" or is this not what it seems?
|> How do these functions interact ?

Canvas::transform does a matrix multiply to concatenate the given matrix
with the current one.  Canvas::push_transform and pop_transform save and
restore the current matrix on a stack.  It is common to follow push_transform
by transform, but

    c->push_transform(t1);
    c->push_transform(t2);

is quite a bit different from

    c->push_transform();
    c->transform(t1);
    c->transform(t2);

Thus, the current API is more general than the simpler one you propose.
Technical Details
Message-ID: <jlt2hgk@fido.asd.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!sgi!fido!marktwain.rad.sgi.com!linton
References: <1992Apr16.131205.10032@fwi.uva.nl>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!sgi!fido!marktwain.rad.sgi.com!linton
From: linton@marktwain.rad.sgi.com (Mark Linton)
Subject: Re: push_transform, transform, pop_transform
Message-ID: <jlt2hgk@fido.asd.sgi.com>
Sender: news@fido.asd.sgi.com (Usenet News Admin)
Reply-To: linton@marktwain.rad.sgi.com (Mark Linton)
Organization: sgi
References:  <1992Apr16.131205.10032@fwi.uva.nl>
Date: Fri, 17 Apr 1992 19:08:18 GMT
Lines: 22