Skip to content

# `fgContour`

## fontgate.fgContour = class fgContour(object)

      Contour representation

      Constructors:
        fgContour() - default
        fgContour(fgContour) - copy

#### Methods

__add__(...)

      x.__add__(y) <==> x+y

__cmp__(...)

      x.__cmp__(y) <==> cmp(x,y)

__delattr__(...)

      x.__delattr__('name') <==> del x.name

__delitem__(...)

      x.__delitem__(y) <==> del x[y]

__delslice__(...)

      x.__delslice__(i, j) <==> del x[i:j]

      Use of negative indices is not supported.

__getattribute__(...)

      x.__getattribute__('name') <==> x.name

__getitem__(...)

      x.__getitem__(y) <==> x[y]

__getslice__(...)

      x.__getslice__(i, j) <==> x[i:j]

      Use of negative indices is not supported.

__init__(...)

      x.__init__(...) initializes x; see help(type(x)) for signature

__len__(...)

      x.__len__() <==> len(x)

__mul__(...)

      x.__mul__(n) <==> x*n

__repr__(...)

      x.__repr__() <==> repr(x)

__rmul__(...)

      x.__rmul__(n) <==> n*x

__setattr__(...)

      x.__setattr__('name', value) <==> x.name = value

__setitem__(...)

      x.__setitem__(i, y) <==> x[i]=y

__setslice__(...)

      x.__setslice__(i, j, y) <==> x[i:j]=y

      Use  of negative indices is not supported.

__str__(...)

      x.__str__() <==> str(x)

appendNode(...)

      appendNode(fgNode) - add node to the end of the contour

area(...)

      float area()

autoClose(...)

      bool autoClose() - bool autoClose() - close contour, return true if changes was made

autoInterpolated(...)

      bool autoInterpolated() - interpolate contour nodes, return true if changes was made

autoSmooth(...)

      bool autoSmooth() - smooth contour nodes, return true if changes was made

boundingBox(...)

      fgRect boundingBox(fgMatrix[, bool prepareExport = false])

clear(...)

      clear() - clear all nodes

contains(...)

      bool/Nothing contains(fgPoint[, bool winding = false])

containsCurvePoint(...)

      bool containsCurvePoint()

containsOffPoint(...)

      bool containsOffPoint()

countNodes(...)

      int countNodes() - get count of nodes

deleteNode(...)

      bool deleteNode(int nodeIndex) - delete node

draw(...)

      draw(segmentPen) - draw the object with a segment pen

drawPoints(...)

      drawPoints(pointPen) - draw the object with a point pen

empty(...)

      bool empty() - return True if contour haven't any node

filterOnPoints(...)

      filterOnPoints()

getNode(...)

      fgNode getNode(int nodeIndex) - get node by index

getNodes(...)

      [ fgNode ] getNodes() - get list of fgNode objects

getUFONodesList(...)

      [ ((x, y), 'nodetype', bool smooth, 'name') ] getUFONodesList() -get list of contour nodes as UFO-style tuples

insertNode(...)

      insertNode(fgNode, int insertTo) - insert node into position insertTo

isCompatible(...)

      bool isCompatible(fgContour)

length(...)

      int length() - get count of nodes

midPoint(...)

      fgPoint midPoint()

reverse(...)

      reverse() - reverse order of contour nodes

toCurves(...)

      toCurves([tolerance = 5.])

toShortSplines(...)

      toShortSplines([tolerance = 5.[, bool short_splines = true]])

transform(...)

      fgContour transform(fgMatrix)

#### Descriptors

name

      (string) name of contour

nodes

      ([fgNode]) contour nodes

open

      (bool) open flag

#### Attributes

__new__ = <built-in method __new__ of type object>

      T.__new__(S, ...) -> a new object with type S, a subtype of T

## `appendNode`

fontgate.fgContour.appendNode = appendNode(...)

      appendNode(fgNode) - add node to the end of the contour

## `area`

fontgate.fgContour.area = area(...)

      float area()

## `autoClose`

fontgate.fgContour.autoClose = autoClose(...)

      bool autoClose() - bool autoClose() - close contour, return true if changes was made

## `autoInterpolated`

fontgate.fgContour.autoInterpolated = autoInterpolated(...)

      bool autoInterpolated() - interpolate contour nodes, return true if changes was made

## `autoSmooth`

fontgate.fgContour.autoSmooth = autoSmooth(...)

      bool autoSmooth() - smooth contour nodes, return true if changes was made

## `boundingBox`

fontgate.fgContour.boundingBox = boundingBox(...)

      fgRect boundingBox(fgMatrix[, bool prepareExport = false])

## `clear`

fontgate.fgContour.clear = clear(...)

      clear() - clear all nodes

## `contains`

fontgate.fgContour.contains = contains(...)

      bool/Nothing contains(fgPoint[, bool winding = false])

## `containsCurvePoint`

fontgate.fgContour.containsCurvePoint = containsCurvePoint(...)

      bool containsCurvePoint()

## `containsOffPoint`

fontgate.fgContour.containsOffPoint = containsOffPoint(...)

      bool containsOffPoint()

## `countNodes`

fontgate.fgContour.countNodes = countNodes(...)

      int countNodes() - get count of nodes

## `deleteNode`

fontgate.fgContour.deleteNode = deleteNode(...)

      bool deleteNode(int nodeIndex) - delete node

## `draw`

fontgate.fgContour.draw = draw(...)

      draw(segmentPen) - draw the object with a segment pen

## `drawPoints`

fontgate.fgContour.drawPoints = drawPoints(...)

      drawPoints(pointPen) - draw the object with a point pen

## `empty`

fontgate.fgContour.empty = empty(...)

      bool empty() - return True if contour haven't any node

## `filterOnPoints`

fontgate.fgContour.filterOnPoints = filterOnPoints(...)

      filterOnPoints()

## `getNode`

fontgate.fgContour.getNode = getNode(...)

      fgNode getNode(int nodeIndex) - get node by index

## `getNodes`

fontgate.fgContour.getNodes = getNodes(...)

      [ fgNode ] getNodes() - get list of fgNode objects

## `getUFONodesList`

fontgate.fgContour.getUFONodesList = getUFONodesList(...)

      [ ((x, y), 'nodetype', bool smooth, 'name') ] getUFONodesList() -get list of contour nodes as UFO-style tuples

## `insertNode`

fontgate.fgContour.insertNode = insertNode(...)

      insertNode(fgNode, int insertTo) - insert node into position insertTo

## `isCompatible`

fontgate.fgContour.isCompatible = isCompatible(...)

      bool isCompatible(fgContour)

## `length`

fontgate.fgContour.length = length(...)

      int length() - get count of nodes

## `midPoint`

fontgate.fgContour.midPoint = midPoint(...)

      fgPoint midPoint()

## `name`

fontgate.fgContour.name

      (string) name of contour

## `nodes`

fontgate.fgContour.nodes

      ([fgNode]) contour nodes

## `open`

fontgate.fgContour.open

      (bool) open flag

## `reverse`

fontgate.fgContour.reverse = reverse(...)

      reverse() - reverse order of contour nodes

## `toCurves`

fontgate.fgContour.toCurves = toCurves(...)

      toCurves([tolerance = 5.])

## `toShortSplines`

fontgate.fgContour.toShortSplines = toShortSplines(...)

      toShortSplines([tolerance = 5.[, bool short_splines = true]])

## `transform`

fontgate.fgContour.transform = transform(...)

      fgContour transform(fgMatrix)