Strict Standards: Only variables should be passed by reference in /home/abeall/public_html/fireworks/download.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/abeall/public_html/fireworks/download.php:28) in /home/abeall/public_html/fireworks/download.php on line 44
// Fireworks JavaScript Command // Install by copying to Fireworks/Configuration/Commands/ // Aaron Beall 2007-2011 - // Version 1.4.1 /* BUGS - [CHANGED-v1.3] overall distribution of subdivided points seems very uneven. inherit bezier interpolation, or a problem in the code? analysis: it was bad code. after some expirimentation the procedure of subdividing a bezier curve more than once is not easy as I expected, without performing ridiculous amounts of redundent bezier walks, so for now subdivide doesn't prompt for a number of divisions but only divides in half, which is fast to compute and can be repeated manually to add more divisions - [CHANGED-v1.4] copyObject/pasteObject to copyNode/pasteNode */ var dom = fw.getDocumentDOM(); // document object var sel = [].concat(fw.selection); // saved selection function SubDividePoints() { // require active document if (!dom) return false; // validate selection var paths = []; for(var s in sel){ if(sel[s] == '[object Path]') paths.push(sel[s]); } if(!paths.length) return alert('This command requires at least one selected path.'); // user input /*var divisions = 'undefined', error; while((isNaN(Number(divisions)) || Number(divisions)<=1 || Math.round(Number(divisions))!=Number(divisions)) && divisions!=null){ if(error)alert(error); divisions = prompt('Number of segment divisions:',(fw.SubDividePoints_divisions||2)); error = 'Invalid input; enter positive integers above 1.'; } if(divisions == null)return false; divisions = Math.abs(Number(divisions)); fw.SubDividePoints_divisions = divisions; //remember user input for next time*/ // add points to all paths in selection var p = paths.length, c, ln, prevNode, nextNode, percent, bez, pt, newNode, prevNewNode, nextNewNode; var con, nodes, newNodes; var subselect = fw.activeTool == 'Subselection', pointsAdded = false; while(p--){ c = paths[p].contours.length; while(c--){ con = paths[p].contours[c]; nodes = paths[p].contours[c].nodes; newNodes = [], nextNewNode = null; ln = nodes.length; for(var n = 0; n < ln; n++){ newNodes.push(copyNode(nodes[n])); if(n == ln - 1 && !con.isClosed) break; nextNode = nodes[n + 1] || newNodes[0]; prevNode = nodes[n]; //nextNewNode = copyNode(nextNode); if(subselect && !(nodes[n].isSelectedPoint && nextNode.isSelectedPoint)) continue; /*for(var i=1; i