Exemplo n.º 1
0
    def expandGlyph(self, glyph, preserveComponents=True):
        defconGlyph = glyph.naked()

        glyph.prepareUndo("Outline")

        isQuad = curveConverter.isQuadratic(defconGlyph)

        if isQuad:
            curveConverter.quadratic2bezier(defconGlyph)

        outline = self.calculate(glyph, preserveComponents)

        glyph.clearContours()
        outline.drawPoints(glyph.getPointPen())

        if isQuad:
            curveConverter.bezier2quadratic(defconGlyph)

        glyph.round()
        glyph.performUndo()
    def expandGlyph(self, glyph, preserveComponents=True):
        defconGlyph = glyph.naked()

        glyph.prepareUndo("Outline")

        isQuad = curveConverter.isQuadratic(defconGlyph)

        if isQuad:
            curveConverter.quadratic2bezier(defconGlyph)

        outline = self.calculate(defconGlyph, preserveComponents)

        glyph.clearContours()
        outline.drawPoints(glyph.getPointPen())

        if isQuad:
            curveConverter.bezier2quadratic(defconGlyph)

        glyph.round()
        glyph.performUndo()
Exemplo n.º 3
0
 def expand(self, sender):
     glyph = CurrentGlyph()
     
     defconGlyph = glyph.naked()
     
     glyph.prepareUndo("Outline")
     
     isQuad = curveConverter.isQuadratic(defconGlyph)
     
     if isQuad:
         curveConverter.quadratic2bezier(defconGlyph)
     
     outline = self.calculate(glyph)
     
     glyph.clear()
     outline.drawPoints(glyph.getPointPen())
     
     if isQuad:
         curveConverter.bezier2quadratic(defconGlyph)
     
     glyph.round()
     glyph.performUndo()