Article View: adobe.postscript.programming
Article #826programming patterns in languagelevel 3
From: Mike_LeFrancois
Date: Thu, 18 Dec 2003 16:19
Date: Thu, 18 Dec 2003 16:19
24 lines
1918 bytes
1918 bytes
I am writing code that produces a cross-section of various layers. To differentiate the layers I am trying to use various patterns such as: hatching with straight lines, diagonal lines, cross-hatching, circles, etc.. However, I am finding it difficult to create just evenly spaced vertical and horizontal lines. The following is a sample code that (I think should) produces a evenly spaced cross-hatching pattern, or grid type of pattern:
<< /PatternType 1 % Tiling pattern
/PaintType 1 % Colored
/TilingType 3
/BBox [50 0 100 100]
/XStep 10
/YStep 10
/PaintProc
{
pop % pop pattern dictionary
%0.0 0.0 0.0 setrgbcolor
72.0 72.0 scale 0 setlinewidth
0 1 50 {0 moveto 0 11 rlineto} for
0 1 50 {0 exch moveto 8 0 rlineto} for
stroke
} bind
> % End prototype pattern dictionary
This works on a standard page ok. However, when I try it on my drawing the cross-hatching comes out not evenly spaced. Any ideas? Also, does anybody know a good informational place to get postscript code in languatelevel 3 for producing such patterns. I still need to come up with circles and other various types of standard patterns. Thanks.
Technical Details
Message-ID:
<2cceff86.-1@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webxShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c61a,fe620bb48a3d868f,start X-Google-Attributes: gid10c61a,public X-Google-ArrivalTime: 2003-12-18 08:37:53 PST From: Mike_LeFrancois@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.postscript.programming Subject: programming patterns in languagelevel 3 Message-ID: <2cceff86.-1@webx.la2eafNXanI> Date: Thu, 18 Dec 2003 08:19:59 -0800 Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit