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 5979589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:40:50+00:00 2026-05-22T21:40:50+00:00

today I have a (simple) rendering problem for you. My current project gets datas

  • 0

today I have a (simple) rendering problem for you. My current project gets datas from a file to generate a SVG file. Drawing things as polygon is pretty easy thanks to the SVG format, but I have a single problem: some of my polygons are in AND out of the page (meaning that some parts of them are displayed while the rest is not shown due to the fact they are out of the display limit). In order to optimize the final SVG file I need to reduce my polygon to a simpler form.

Consider the grey rectangle as my page.
Consider the green polygon as the thing I actually draw.

First picture shows you the thing that I actually have while the second picture shows you the final result I want to have.

Polygon and page as I have them now
Polygon and page as I need to have them
First I thought to reduce my polygon in simple triangles in order to only draw points in the display limits. But I think a simpler solution exists… if you have it do not hesitate to share it with me 🙂

EDIT:

I have this tricky case to handle as well :

enter image description hereenter image description here

Thank you.

  • 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-05-22T21:40:51+00:00Added an answer on May 22, 2026 at 9:40 pm
    1. Clipping a polygon with a rectangle. We reduce this problem to
    2. clipping a polygon with a line. We reduce this to an even simpler problem:
    3. clipping one edge of a polygon with a line. Which is really just
    4. Finding the intersection of a line segment with a line (if it exists).

    The last problem is pretty easy, considering that your lines are vertical or horizontal. Is that enough?

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

Sidebar

Related Questions

today i have a simple an understable problem for me . Next code: alphavar
Afternoon all. A very simple one for you today from thicky Rich. I have
I'm asking the best solution for a very 'simple' problem. Today, I have emails
I've run on a little problem today: I have a JS drop down menu
Today's my first day with Flex and FlashDevelop. In my ActionScript file, I have
So I came across an interesting problem today. We have a WCF web service
Let's say I have a simple config file that my c program needs to
I have a simple If..Then like so: If rhcexists.First.SignatureDate > Date.Today.AddMonths(-6) Then End If
I have a simple Entity query: Dim rhcexists = From p In dbContracts.Signatures _
I'm sure this is simple but my brain just isnt working today! I have

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.