Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #561
| From | Helge Blischke <h.blischke@acm.org> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: How can I stretch a Postscript image, vertically only?? |
| Followup-To | comp.lang.postscript |
| Date | 2012-01-10 12:50 +0100 |
| Message-ID | <9n2n0jF1f1U1@mid.individual.net> (permalink) |
| References | <621c6264-3d28-42d0-81b6-65d0f4eb934e@m11g2000yqe.googlegroups.com> <9n0vt8Fpp4U1@mid.individual.net> <bb086a9a-f4b7-43d3-9f1b-ba9691542b65@k28g2000yqn.googlegroups.com> <5f5084db-e002-401d-8a8d-072e0592db75@q17g2000yqh.googlegroups.com> <1f50f327-f97f-496f-971b-c1d2996b41e1@r5g2000yqc.googlegroups.com> |
Followups directed to: comp.lang.postscript
luser- -droog wrote: > On Jan 9, 3:27 pm, luser- -droog <mijo...@yahoo.com> wrote: >> On Jan 9, 2:44 pm, Ramon F Herrera <ra...@conexus.net> wrote: >> >> >> >> > On Jan 9, 2:10 pm, Helge Blischke <h.blisc...@acm.org> wrote: >> >> > > Ramon F Herrera wrote: >> >> > > > See my thread "Need minimum/tutorial Postscript code". >> >> > > > In essence, I need to multiply the vertical dimensions by a factor >> > > > of 3. >> >> > > > TIA, >> >> > > > -Ramon >> >> > > What about >> > > >> > > 1 3 scale >> > > >> > > ? >> > > >> > > Helge >> >> > Thanks Helge! >> >> > I tried it, but it doesn't work. It scales the traces, making the >> > horizontal lines thicker: >> >> That's not fatal! You just need to *un*scale before you `stroke`. >> >> matrix currentmatrix % get a copy of the 'current' matrix >> 1 3 scale >> %create path (moveto's and lineto's) >> setmatrix % reinstall the saved matrix >> stroke % draw the lines with the "normal" pen-shape. >> >> In a pinch, you can use >> matrix defaultmatrix setmatrix >> to reset the pen-shape. But this is a bad habit; it destroys >> modularity; and it's illegal in EPS. Because you can't *embed* >> the program fragment anymore. "illegal" is a hard statement. The core of the restrictions the PLRM states on EPS files is that an EPS must not generate any unwanted side effects that may have influence of the environment that includes the EPS. But if you use e.g. setmatrix as shown above it is perfectly legal. > > This is an aspect of postscript that took me a looooong time even > to notice. For line-drawing, postscript uses the Current > Transformation > Matrix /twice/! It transforms user coordinates through the CTM and > stores the current path in device-space points (so currentpoint > uses itransform to present the point in the current user-space). > > Then, when you stroke, it uses the CTM a second time to define the > shape of the virtual pen (brush) that performs the drawing. > > A nifty special effect is to use some crazy /skewed/ pen to draw > an otherwise static picture. It can "liven things up". > > % construct path (moveto's and lineto's) > [ 1 .5 5 30 0 0 ] setmatrix stroke
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
How can I stretch a Postscript image, vertically only?? Ramon F Herrera <ramon@conexus.net> - 2012-01-09 11:35 -0800
Re: How can I stretch a Postscript image, vertically only?? Helge Blischke <h.blischke@acm.org> - 2012-01-09 21:10 +0100
Re: How can I stretch a Postscript image, vertically only?? Ramon F Herrera <ramon@conexus.net> - 2012-01-09 12:44 -0800
Re: How can I stretch a Postscript image, vertically only?? luser- -droog <mijoryx@yahoo.com> - 2012-01-09 13:27 -0800
Re: How can I stretch a Postscript image, vertically only?? luser- -droog <mijoryx@yahoo.com> - 2012-01-10 00:25 -0800
Re: How can I stretch a Postscript image, vertically only?? Helge Blischke <h.blischke@acm.org> - 2012-01-10 12:50 +0100
Re: How can I stretch a Postscript image, vertically only?? luser- -droog <mijoryx@yahoo.com> - 2012-09-13 21:34 -0700
Re: How can I stretch a Postscript image, vertically only?? helmwo@gmail.com - 2012-09-24 09:16 -0700
Re: How can I stretch a Postscript image, vertically only?? "luser.droog" <luser.droog@gmail.com> - 2012-09-24 18:25 -0500
Re: How can I stretch a Postscript image, vertically only?? Ramon F Herrera <ramon@conexus.net> - 2012-01-09 12:54 -0800
csiph-web