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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:40:20+00:00 2026-06-15T02:40:20+00:00

EDIT5: Finally got Angus Johnson’s Clipper library implemented in Javascript and selected Sourceforge for

  • 0

EDIT5: Finally got Angus Johnson’s Clipper library implemented in Javascript and selected Sourceforge for host.

LIVE DEMO: http://jsclipper.sourceforge.net/6.1.1.1/main_demo.html

Download source:
https://sourceforge.net/projects/jsclipper/

Wikipage with step-by-step tutorial:
https://sourceforge.net/p/jsclipper/wiki/Home%206/

Presentation of Demo Program including tens of sample polygons:
https://sourceforge.net/p/jsclipper/wiki/Main_Demo%206/

I hope this helps anyone who needs polyline and polygon clipping library with offsetting features.


EDIT4: The one possibility is to convert pascal to javascript using
http://p2js.gelicon.biz/en/ . Not succeeded yet. p2js.exe clipper.pas gives Fatal error “Can’t find unit system used by clipper”.


EDIT: I found script# (Github), which seems to be able to convert C# to Javascript. Clipper lib is available in C#, so would it be possible to make C#->JS conversion using Script# and how?

EDIT3: Got not converted with script#, but there is also Emscripten, but 4000 cpp lines converted to 300 000 Javascript lines, so not an option. Manual conversion seems to be a king.


EDIT2: I made an example, which shows the problem. Use arrow left and right to apply offset. In certain distance it works ok, but then something goes wrong. The yellow stroked polygon is so called raw offset polygon, and AFAIK Clipper lib provides a way to take care of removing unneeded parts of raw offset polygon.


There is a Clipper library by Angus Johnson for offsetting polygons.

I’d need this functionality in Javascript for offsetting SVG polygons.

Has someone made a Javascript port of it?

If not, I’d appreciate some guidelines eg. the following:
– how enormous task it would be?
– which one to choose for source (Delphi, C#, C++)?
– is everything in lib needed for offsetting?

The Clipper library produces the following results which are just the desired functionality:

Offset Polygons, polygons, delta, jointype, miterlimit, jtSquare jtRound jtMiter

Some links:
– Files in Sourceforge
– Clipper Documentation
– One Stackoverflow answer
– Offsetting algorithm

  • 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-15T02:40:22+00:00Added an answer on June 15, 2026 at 2:40 am

    I have succeded in porting clipper to JS, and after a while, after thorough testing going to release it. Seems that all the functionality could have been ported.

    One caveat, 128bit support is reduced to 106bit.

    One of the pros is to reach large space of browsers and possibility to use svg, vml, html5 canvas as graphics interface.

    Any ideas, Which host would be easiest to publish, with demo possibility?


    EDIT:

    Finally got Angus Johnson’s Clipper library implemented in Javascript and selected Sourceforge for host.

    LIVE DEMO:
    http://jsclipper.sourceforge.net/6.1.1.1/main_demo.html

    Downloads:
    https://sourceforge.net/projects/jsclipper/

    Wikipage with step-by-step tutorial:
    https://sourceforge.net/p/jsclipper/wiki/Home%206/

    Presentation of Demo Program including tens of sample polygons:
    https://sourceforge.net/p/jsclipper/wiki/Main_Demo%206/

    I hope this helps anyone who needs polyline and polygon clipping library with offsetting features.

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

Sidebar

Related Questions

I've finally got this PHP email script working (didn't work on localhost…), but my
It seems that I've finally got to implement some sort of threading into my
Ok so I have finally got my WCF service running great. It has taken
Edit: I finally got it to work!!! It needed a combination of JUnit in
It took me a long time but I finally got nHibernate's Hello World to
I have been having constant struggle with Visual Studio debugger and finally got fed
I have got a C function in a static library, let's call it A,
I finally got some parts working here: http://jsfiddle.net/trXBr/5/ but when I put the code
I finally got back to fleshing out a GitCommit message mode that I want
So I finally got my listview to display result(s) from my db query, but

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.