Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3593

Re: How to ensure line widths are the same vertically and horizontally?

Newsgroups comp.lang.postscript
Date 2020-10-07 03:43 -0700
References <a565e9bf-9ea2-4042-b498-c655d1bb9a5bn@googlegroups.com> <rli4bg$mi1$1@dont-email.me>
Message-ID <c01f9033-78df-4b47-83ea-efc7071d34e8n@googlegroups.com> (permalink)
Subject Re: How to ensure line widths are the same vertically and horizontally?
From Eremey Valetov <eremeyvvaletov@gmail.com>

Show all headers | View raw


On Tuesday, October 6, 2020 at 11:00:50 AM UTC-5, Jeffrey H. Coffield wrote:
> On 10/06/2020 02:55 AM, Eremey Valetov wrote: 
> > Hello All, 
> > 
> > The width of a line in PostScript is defined in terms of distances in the user space. In my use case, the aspect ratio of the device space (e.g. 4:3) is different from the aspect ratio of the user space (e.g. 1:1), which causes the line widths in the device space to be different in vertical and horizontal directions. 
> > 
> > How to make line widths the same regardless of the line orientation? The PostScript Language Reference Manual for setlinewidth mentions that if the current transformation matrix (CTM) in effect at the time of the stroke specifies scaling by different factors in the x and y dimensions, then thickness of the lines can vary. 
> > 
> > Does this mean that if I set a CTM with the same scaling factor in x and y dimensions before calling stroke and them reset the CTM to the value used elsewhere in the PostScript file, the line widths will be the same without affecting anything else? 
> > 
> > Thanks, 
> > Eremey 
> >
> Without writing a test case, it would seem to me that changing the scale 
> factor would not change the line width, but also the line position. Do 
> you have a sample .ps file that demonstrates what you want to acheive? 
> 
> Jeff Coffield 
> www.digitalsynergyinc.com

Hi Jeff,

I placed the original version of the test case "pic002_old.ps" and a new version "pic002_new.ps", where the issue of non-uniform line widths is fixed, in the following filebin:
https://filebin.net/1ih1vywlu9ep2hoz

I resolved the issue by replacing "/sn {newpath} bind def" with "/sn {gsave 1 1.5 scale stroke newpath grestore} bind def".

Thanks,
Eremey

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to ensure line widths are the same vertically and horizontally? Eremey Valetov <eremeyvvaletov@gmail.com> - 2020-10-06 02:55 -0700
  Re: How to ensure line widths are the same vertically and horizontally? "Jeffrey H. Coffield" <jeffrey@digitalsynergyinc.com> - 2020-10-06 09:00 -0700
    Re: How to ensure line widths are the same vertically and horizontally? Eremey Valetov <eremeyvvaletov@gmail.com> - 2020-10-07 03:38 -0700
    Re: How to ensure line widths are the same vertically and horizontally? Eremey Valetov <eremeyvvaletov@gmail.com> - 2020-10-07 03:43 -0700
  Re: How to ensure line widths are the same vertically and horizontally? luser droog <luser.droog@gmail.com> - 2020-10-06 11:04 -0700
    Re: How to ensure line widths are the same vertically and horizontally? luser droog <luser.droog@gmail.com> - 2020-10-06 16:35 -0700
      Re: How to ensure line widths are the same vertically and horizontally? Eremey Valetov <eremeyvvaletov@gmail.com> - 2020-10-07 03:48 -0700
        Re: How to ensure line widths are the same vertically and horizontally? luser droog <luser.droog@gmail.com> - 2020-10-07 08:40 -0700
          Re: How to ensure line widths are the same vertically and horizontally? Eremey Valetov <eremeyvvaletov@gmail.com> - 2020-10-07 21:21 -0700
            Re: How to ensure line widths are the same vertically and horizontally? luser droog <luser.droog@gmail.com> - 2020-10-10 08:13 -0700

csiph-web