Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:57:10+00:00 2026-06-07T07:57:10+00:00

I have just begun learning PostScript in order to produce graphics for LaTeX and

  • 0

I have just begun learning PostScript in order to produce graphics for LaTeX and I have no idea how to combine a path with itself so the stroke only affect the outer border of the drawn shape. My code is as follows:

/black { 0 0 0 1 setcmykcolor } def
/gold { 0.02 0.17 0.72 0.05 setcmykcolor } def
newpath
  % the center is 1/2w and 1/2h
  /cx { 1200 2.0 div } def % center-x
  /cy {  600 2.0 div } def % center-y
  /r  {  600 9.0 div
               4 mul
             2.0 div } def % star's radius
  cx r   0 cos mul add
  cy r   0 sin mul add moveto
  cx r 144 cos mul add
  cy r 144 sin mul add lineto
  cx r 288 cos mul add
  cy r 288 sin mul add lineto
  cx r  72 cos mul add
  cy r  72 sin mul add lineto
  cx r 216 cos mul add
  cy r 216 sin mul add lineto
closepath
gsave
gold fill
grestore
1 setlinewidth
black stroke

When the stroke is drawn, the lines crossing the shape are drawn. I would like to know if there is a way to only have the outer border of the shape stricken and not the inner lines. i would rather not have to calculate where the lines forming the star intersect, i.e. keep 5 lines instead of getting 10 smaller ones.

Note also, that I am learning PS as-is and am not wanting to use external programs (read Illustrator and the like). The purpose of this question is to built up my knowledge of PostScript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:57:12+00:00Added an answer on June 7, 2026 at 7:57 am

    Simplest would be to do the stroke first and then the fill. You may want to double your linewidth as doing this effectively cuts the lines in half.

    %...
    closepath
    gsave
      2 setlinewidth
      black stroke
    grestore
    gold fill
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just begun learning Silverlight (though I have 3 years C# experience). I'm trying
I'm reading about the State pattern. I have only just begun, so of course
I've just begun learning Unix and have so far encountered two elementary though difficult
I have just begun learning Python. Eventually I will learn Django, as my goal
So I have just begun learning the Django framework, and I am trying to
In learning C, I've just begun studying pointers to structures and have some questions.
I have just begun working on a project which uses Mercurial as a version
I have just begun working with the Android SDK and I am having problems
I have just begun to use Visual Studio Team System 2008 Database Edition. I'm
I have just started learning python version 3 and trying to create a file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.