Decompose Corner & Cap components


#1

Is there a way to decompose only the corner and cap components from scripts? I do not want to removeOverlap() the whole thing, just the components.


#2
pen = GSBezStringPen.alloc().init()
for thisPath in thisLayer.paths:
	thisPath.drawInPen_(pen)

pathString = pen.charString()
newPaths = removeOverlapFilter.pathsFromBez_gridSize_(pathString,1.0)

And then you need to step through all hints and delete the remaining corner/cap components.


#3

Or do:

thisLayer.decomposeCorners()

#4

Ah, ha ha. Convenience method. Much better, of course.


#5

Thanks! I was only looking at the GSHint help.