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


Groups > comp.lang.postscript > #3590

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

Newsgroups comp.lang.postscript
Date 2020-10-06 11:04 -0700
References <a565e9bf-9ea2-4042-b498-c655d1bb9a5bn@googlegroups.com>
Message-ID <6215e92c-dfbe-46be-a0a3-cb1bf1154f37o@googlegroups.com> (permalink)
Subject Re: How to ensure line widths are the same vertically and horizontally?
From luser droog <luser.droog@gmail.com>

Show all headers | View raw


On Tuesday, October 6, 2020 at 4:56:00 AM UTC-5, 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

You can start with a uniform scaling matrix

  4 4  matrix scale

And then multiply it by the inverse of the CTM

  matrix currentmatrix matrix invertmatrix matrix concatmatrix

Now if you `concat` this matrix onto the CTM, then the CTM will become
exactly the uniform scaling matrix created on the first line.

hth

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