/** * {@inheritDoc} */ @Override public int getEndPtOfContours(int i) { GlyfCompositeComp c = getCompositeCompEndPt(i); if (c != null) { GlyphDescription gd = descriptions.get(c.getGlyphIndex()); return gd.getEndPtOfContours(i - c.getFirstContour()) + c.getFirstIndex(); } return 0; }
/** * Set the points of a glyph from the GlyphDescription. */ private Point[] describe(GlyphDescription gd) { int endPtIndex = 0; int endPtOfContourIndex = -1; Point[] points = new Point[gd.getPointCount()]; for (int i = 0; i < gd.getPointCount(); i++) { if (endPtOfContourIndex == -1) { endPtOfContourIndex = gd.getEndPtOfContours(endPtIndex); } boolean endPt = endPtOfContourIndex == i; if (endPt) { endPtIndex++; endPtOfContourIndex = -1; } points[i] = new Point(gd.getXCoordinate(i), gd.getYCoordinate(i), (gd.getFlags(i) & GlyfDescript.ON_CURVE) != 0, endPt); } return points; }
/** * {@inheritDoc} */ @Override public int getEndPtOfContours(int i) { GlyfCompositeComp c = getCompositeCompEndPt(i); if (c != null) { GlyphDescription gd = descriptions.get(c.getGlyphIndex()); return gd.getEndPtOfContours(i - c.getFirstContour()) + c.getFirstIndex(); } return 0; }
/** * {@inheritDoc} */ @Override public int getEndPtOfContours(int i) { GlyfCompositeComp c = getCompositeCompEndPt(i); if (c != null) { GlyphDescription gd = descriptions.get(c.getGlyphIndex()); return gd.getEndPtOfContours(i - c.getFirstContour()) + c.getFirstIndex(); } return 0; }
/** * Set the points of a glyph from the GlyphDescription. */ private Point[] describe(GlyphDescription gd) { int endPtIndex = 0; int endPtOfContourIndex = -1; Point[] points = new Point[gd.getPointCount()]; for (int i = 0; i < gd.getPointCount(); i++) { if (endPtOfContourIndex == -1) { endPtOfContourIndex = gd.getEndPtOfContours(endPtIndex); } boolean endPt = endPtOfContourIndex == i; if (endPt) { endPtIndex++; endPtOfContourIndex = -1; } points[i] = new Point(gd.getXCoordinate(i), gd.getYCoordinate(i), (gd.getFlags(i) & GlyfDescript.ON_CURVE) != 0, endPt); } return points; }
/** * Set the points of a glyph from the GlyphDescription. */ private Point[] describe(GlyphDescription gd) { int endPtIndex = 0; int endPtOfContourIndex = -1; Point[] points = new Point[gd.getPointCount()]; for (int i = 0; i < gd.getPointCount(); i++) { if (endPtOfContourIndex == -1) { endPtOfContourIndex = gd.getEndPtOfContours(endPtIndex); } boolean endPt = endPtOfContourIndex == i; if (endPt) { endPtIndex++; endPtOfContourIndex = -1; } points[i] = new Point(gd.getXCoordinate(i), gd.getYCoordinate(i), (gd.getFlags(i) & GlyfDescript.ON_CURVE) != 0, endPt); } return points; }