class_docstr: This is a PointPen that passes outline data to another PointPen, but
  reversing the winding direction of all contours. Components are simply
  passed through unchanged.
  
  Closed contours are reversed in such a way that the first point remains
  the first point.
class_docstr_tok: ["This","is","a","PointPen","that","passes","outline","data","to","another","PointPen",",","but","reversing","the","winding","direction","of","all","contours",".","Components","are","simply","passed","through","unchanged",".","Closed","contours","are","reversed","in","such","a","way","that","the","first","point","remains","the","first","point","."]
code: def _flushContour(self):
      pen = self.pen
      contour = self.currentContour
      if not contour:
          pen.beginPath(identifier=self.currentContourIdentifier)
          pen.endPath()
          return
  
      closed = contour[0][1] != "move"
      if not closed:
          lastSegmentType = "move"
      else:
          # Remove the first point and insert it at the end. When
          # the list of points gets reversed, this point will then
          # again be at the start. In other words, the following
          # will hold:
          #   for N in range(len(originalContour)):
          #       originalContour[N] == reversedContour[-N]
          contour.append(contour.pop(0))
          # Find the first on-curve point.
          firstOnCurve = None
          for i in range(len(contour)):
              if contour[i][1] is not None:
                  firstOnCurve = i
                  break
          if firstOnCurve is None:
              # There are no on-curve points, be basically have to
              # do nothing but contour.reverse().
              lastSegmentType = None
          else:
              lastSegmentType = contour[firstOnCurve][1]
  
      contour.reverse()
      if not closed:
          # Open paths must start with a move, so we simply dump
          # all off-curve points leading up to the first on-curve.
          while contour[0][1] is None:
              contour.pop(0)
      pen.beginPath(identifier=self.currentContourIdentifier)
      for pt, nextSegmentType, smooth, name, kwargs in contour:
          if nextSegmentType is not None:
              segmentType = lastSegmentType
              lastSegmentType = nextSegmentType
          else:
              segmentType = None
          pen.addPoint(
              pt,
              segmentType=segmentType,
              smooth=smooth,
              name=name,
              **kwargs,
          )
      pen.endPath()
  
imports: import math
  from typing import Any, Optional, Tuple, Dict
  from fontTools.pens.basePen import AbstractPen, PenError
  from fontTools.misc.transform import DecomposedTransform
label_desc: Use image node_id 2 for calling the ReverseContourPointPen obj's underlying member method code with example usage: obj._flushContour() without return types