docs: void addPoint(GraphicPoint offPt, int i_src) {
  		if (m_offsetPtCount == 0) // TODO: can we have this outside of this
  									// method?
  		{
  			addPoint(offPt);
  			return;
  		}
  
  		int n_src = m_srcPtCount;
  		GraphicPoint pt1, pt;
  		pt1 = m_srcPts.get(i_src == 0 ? n_src - 1 : i_src - 1);
  		pt = m_srcPts.get(i_src);
  
  		// calculate scalar product to determine if the offset segment goes in
  		// the same/opposite direction compared to the original one
  		double s = scal(pt1, pt, m_offsetPts.get(m_offsetPtCount - 1), offPt);
  		if (s > 0)
  		// original segment and offset segment go in the same direction. Just
  		// add the point
  		{
  			addPoint(offPt);
  			return;
  		}
  
  		if (s < 0) {
  			// we will add a loop. We need to make sure the points we introduce
  			// don't generate a "reversed" segment
  			// let's project the first point of the reversed segment
  			// (m_offsetPts + m_offsetPtCount - 1) to check
  			// if it falls on the good side of the original segment (scalar
  			// product sign again)
  			if (scal(pt1, pt, pt, m_offsetPts.get(m_offsetPtCount - 1)) > 0) {
  				GraphicPoint p;
  
  				// change value of m_offsetPts + m_offsetPtCount - 1
  				int k;
  				if (i_src == 0)
  					k = n_src - 2;
  				else if (i_src == 1)
  					k = n_src - 1;
  				else
  					k = i_src - 2;
  				GraphicPoint pt0 = m_srcPts.get(k);
  
  				double a = Math.atan2(pt1.y - pt0.y, pt1.x - pt0.x);
  				p = new GraphicPoint(pt1, m_distance, a - half_pi);
  				m_offsetPts.set(m_offsetPtCount - 1, p);
  
  				if (m_joins == OperatorOffset.JoinType.Bevel
  						|| m_joins == OperatorOffset.JoinType.Miter) {
  					// this block is added as well as the commented BAD_SEG in
  					// the next block
  					p = new GraphicPoint(p, pt1);
  					addPoint(p);
  
  					// "bad" segment
  					p = new GraphicPoint(pt1, m_distance, m_a1 + half_pi);
  
  					GraphicPoint p_ = new GraphicPoint(p, pt1);
  					p_.type |= BAD_SEG;
  					addPoint(p_);
  
  					addPoint(p);
  				} else {
  					// the working stuff for round and square
  
  					// "bad" segment
  					p = new GraphicPoint(pt1, m_distance, m_a1 + half_pi);
  					p.type |= BAD_SEG;
  					addPoint(p);
  				}
  
  				// add offPt
  				addPoint(offPt, i_src);
  			} else {
  				GraphicPoint p;
  
  				// we don't add offPt but the loop containing the "bad" segment
  				p = new GraphicPoint(pt, m_distance, m_a1 + half_pi);
  				addPoint(p);
  
  				if (m_joins == OperatorOffset.JoinType.Bevel
  						|| m_joins == OperatorOffset.JoinType.Miter) {
  					// this block is added as well as the commented BAD_SEG in
  					// the next block
  					p = new GraphicPoint(p, pt);
  					addPoint(p);
  
  					p = new GraphicPoint(pt, m_distance, m_a2 - half_pi);
  					GraphicPoint p_ = new GraphicPoint(p, pt);
  					p_.type |= BAD_SEG;
  					addPoint(p_);
  
  					addPoint(p);
  				} else {
  					// the working stuff for round and square
  					p = new GraphicPoint(pt, m_distance, m_a2 - half_pi);
  					p.type |= BAD_SEG;
  					addPoint(p);
  				}
  			}
  		}
  	}