public final PathPartEntryJSO copy() { final int command = getCommand(); final NFastDoubleArrayJSO points = getPoints().copy(); return make(command, points); } }
private void copyDoubles() { m_entries = new NFastArrayList<>(); final NFastArrayList<PathPartList> lists = m_listOfPaths; for (final PathPartList list : lists) { for (int i = 0; i < list.size(); i++) { final PathPartEntryJSO entry = list.get(i); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final double x = points.get(0); final double y = points.get(1); final NFastDoubleArrayJSO doubles = NFastDoubleArrayJSO.make(x, y); m_entries.push(doubles); break; } } } } } }
public final PathPartList M(final double x, final double y) { m_mov = true; push(PathPartEntryJSO.make(PathPartEntryJSO.MOVETO_ABSOLUTE, NFastDoubleArrayJSO.make(m_cpx = x, m_cpy = y))); return this; }
private static final boolean isCorner(final PathPartEntryJSO e1, final PathPartEntryJSO e2) { if ((e1 == null) || (e2 == null)) { return true; } final int c1 = e1.getCommand(); final int c2 = e2.getCommand(); if ((c1 == PathPartEntryJSO.MOVETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.CLOSE_PATH_PART)) { return true; } return false; }
list.push(entry.copy());
private void copyDoubles() { m_entries = new NFastArrayList<>(); final NFastArrayList<PathPartList> lists = m_listOfPaths; for (final PathPartList list : lists) { for (int i = 0; i < list.size(); i++) { final PathPartEntryJSO entry = list.get(i); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final double x = points.get(0); final double y = points.get(1); final NFastDoubleArrayJSO doubles = NFastDoubleArrayJSO.make(x, y); m_entries.push(doubles); break; } } } } } }
public final PathPartList L(final double x, final double y) { push(PathPartEntryJSO.make(PathPartEntryJSO.LINETO_ABSOLUTE, NFastDoubleArrayJSO.make(m_cpx = x, m_cpy = y))); return this; }
private static final boolean isCorner(final PathPartEntryJSO e1, final PathPartEntryJSO e2) { if ((e1 == null) || (e2 == null)) { return true; } final int c1 = e1.getCommand(); final int c2 = e2.getCommand(); if ((c1 == PathPartEntryJSO.MOVETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.CLOSE_PATH_PART)) { return true; } return false; }
list.push(entry.copy());
private void copyDoubles() { m_entries = new NFastArrayList<>(); final NFastArrayList<PathPartList> lists = m_listOfPaths; for (final PathPartList list : lists) { for (int i = 0; i < list.size(); i++) { final PathPartEntryJSO entry = list.get(i); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final double x = points.get(0); final double y = points.get(1); final NFastDoubleArrayJSO doubles = NFastDoubleArrayJSO.make(x, y); m_entries.push(doubles); break; } } } } } }
public final PathPartEntryJSO copy() { final int command = getCommand(); final NFastDoubleArrayJSO points = getPoints().copy(); return make(command, points); } }
public final PathPartList H(final double x) { push(PathPartEntryJSO.make(PathPartEntryJSO.LINETO_ABSOLUTE, NFastDoubleArrayJSO.make(m_cpx = x, m_cpy))); return this; }
private static final boolean isCorner(final PathPartEntryJSO e1, final PathPartEntryJSO e2) { if ((e1 == null) || (e2 == null)) { return true; } final int c1 = e1.getCommand(); final int c2 = e2.getCommand(); if ((c1 == PathPartEntryJSO.MOVETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.LINETO_ABSOLUTE)) { return true; } if ((c1 == PathPartEntryJSO.LINETO_ABSOLUTE) && (c2 == PathPartEntryJSO.CLOSE_PATH_PART)) { return true; } return false; }
list.push(entry.copy());
final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand())
public final PathPartEntryJSO copy() { final int command = getCommand(); final NFastDoubleArrayJSO points = getPoints().copy(); return make(command, points); } }
public final PathPartList Q(final double cx, final double cy, final double x, final double y) { push(PathPartEntryJSO.make(PathPartEntryJSO.QUADRATIC_CURVETO_ABSOLUTE, NFastDoubleArrayJSO.make(cx, cy, m_cpx = x, m_cpy = y))); return this; }
private static final boolean isClosed(final PathPartList list) { final int listSize = list.size(); if (listSize <= 2) { return false; } final PathPartEntryJSO part = list.get(listSize - 1); if (part.getCommand() == PathPartEntryJSO.CLOSE_PATH_PART) { return true; } else { return false; } }
final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand())
if (size > 2 && m_list.get(size - 1).getCommand() == PathPartEntryJSO.CLOSE_PATH_PART) if (prev.getCommand() == PathPartEntryJSO.MOVETO_ABSOLUTE) cpx = prev.getPoints().get(0) + dx; cpy = prev.getPoints().get(1) + dy; if (prev.getCommand() == PathPartEntryJSO.BEZIER_CURVETO_ABSOLUTE) ctx = cpx + (cpx - prev.getPoints().get(2)); cty = cpy + (cpy - prev.getPoints().get(3)); if (prev.getCommand() == PathPartEntryJSO.BEZIER_CURVETO_ABSOLUTE) ctx = cpx + (cpx - prev.getPoints().get(2)); cty = cpy + (cpy - prev.getPoints().get(3)); if (prev.getCommand() == PathPartEntryJSO.QUADRATIC_CURVETO_ABSOLUTE) ctx = cpx + (cpx - prev.getPoints().get(0)); cty = cpy + (cpy - prev.getPoints().get(1)); if (prev.getCommand() == PathPartEntryJSO.QUADRATIC_CURVETO_ABSOLUTE) ctx = cpx + (cpx - prev.getPoints().get(0));