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

  • Home
  • SEARCH
  • 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 8378995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:03:37+00:00 2026-06-09T16:03:37+00:00

I am trying to draw a top view of an IC package, which should

  • 0

I am trying to draw a top view of an IC package, which should look like this (sorry I couldnt even draw it good enough using windows’s paint!)

enter image description here

I am using a path obeject, but the result of my path object is no where near what I expect. Atleast the complete rectangle itself draws fine but I have problem to make that top arc you see in my example picture. Would be nice if you can point me to the right place. Here is my code:

    private GraphicsPath DrawDilBounds(Size size)
    {
        var p = new GraphicsPath(FillMode.Alternate);
        p.StartFigure();
        p.AddLine(0, 0, 0, size.Height);
        p.AddLine(0, size.Height, size.Width, size.Height);
        p.AddLine(size.Width, size.Height, size.Width, 0);
        p.AddLine(size.Width, 0, (size.Width/2) - 10, 0);
        p.AddArc(size.Width/2 - 10, 0, 10, 10, 10, 10); //This arc looks like no arc!
        p.AddLine((size.Width/2) + 10, 0, 0, 0);
        p.CloseFigure();

        return p;
    }

So what I am doing here is starting some lines from top left corner , to bottom left corner, to right bottom corner and finaly to top right corner, then I added a line from top right corner to the middle of the top , minus 10 pixels then I want to add the arc with width of 20 pixels and then finish the drawing back to the top left corner.

  • 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-09T16:03:38+00:00Added an answer on June 9, 2026 at 4:03 pm

    You specify the arc by its bounding box. Using 10 as the radius gives a box of 20 x 20 (you used 10 x 10) whose upper left corner is located at (-10, -10) from the center of the arc (you used (-10, 0)). The last two arguments must be degrees, the starting and ending angle. Since you draw it from left-to-right that will be 0 and 180 degrees (you used 10 and 10). You also fumbled the lengths of the 2 lines at the top, they should be half the width -10 (you used +10). Fix:

            p.AddLine(size.Width, 0, (size.Width / 2) + 10, 0);
            p.AddArc(size.Width / 2 - 10, -10, 20, 20, 0, 180);
            p.AddLine((size.Width / 2) - 10, 0, 0, 0);
    

    Which gets you:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to draw custom UI (a path in this case) on top of
I am trying to draw a figure something like this: I need to have
I'm trying to draw at the top of my NSView which has some subviews.
I'm trying to draw a semi-transparent rectangle on top of an image to act
I'm just trying to draw a line with JavaScript. I would like it to
I am trying to draw rectangle on top of image and I am having
I'm trying to draw an anti-aliased trapezoid by starting at the top and drawing
I am trying to place an OpenGL view on top of a standard UIView
I'm trying to draw 2 Quad_Strips on top of each other, but I can't
I am trying to draw a line on top of an image background -

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.