• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

how does eoclip work on this sample postscript program?

New Here ,
Aug 10, 2015 Aug 10, 2015

Copy link to clipboard

Copied

I am totally new to Postscript programming and I want to know what eoclip operator does on this particular program.

<< /PageSize [792 1224] >> setpagedevice

eoclip newpath

12 8 768 1208 rectclip

72 72 scale

8 8 1 [8 0 0 8 0 0] {<c936>} image

showpage

I already understand the other operator does, except eoclip.

The output of this program in ghostscript is a blank page.

but when I removed the eoclip operator, the image prints correctly.

I am confused on how the even-odd rule applies on this program.

TOPICS
Programming

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 11, 2015 Aug 11, 2015

Copy link to clipboard

Copied

Hi, xiriusly.

The eoclip operator clips to the current path using even-odd logic. The problem with your code is that there is no current path at the time you call eoclip; you are therefore clipping to an empty path, that is, a path with no interior. Your imageable region ends up being a space of 0 area.

Add something like this before your call to eoclip and you should see part of your image appear:

12 0 moveto

30 0 rlineto

-15 20 rlineto

closepath

Now your call to eoclip will make the imageable region the interior of this triangle.

Hope this helps.

- John Deubert

===============

Acumen Training

PostScript & PDF

Consulting & Training

john@acumentraining.com

www.acumentraining.com

===============

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 12, 2015 Aug 12, 2015

Copy link to clipboard

Copied

LATEST

If you don't have it, the PostScript Language Reference Manual is here: https://www.adobe.com/products/postscript/pdfs/PLRM.pdf

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines