Anonymous user
Sutherland-Hodgman polygon clipping: Difference between revisions
Sutherland-Hodgman polygon clipping (view source)
Revision as of 21:47, 29 January 2021
, 3 years ago→{{header|JavaScript}}
m (→{{header|Phix}}: IupCloseOnEscape no longer needed) |
|||
Line 1,763:
var outputList = subjectPolygon;
cp1 = clipPolygon[clipPolygon.length-1];
for (var j in clipPolygon) {
var cp2 = clipPolygon[j];
var inputList = outputList;
outputList = [];
s = inputList[inputList.length - 1]; //last on the input list
for (var i in inputList) {
var e = inputList[i];
if (inside(e)) {
|