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; } }
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; } }
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; } }
public static int skipRedundantLeadingMoveTo(final PathPartList list) { int i = 0; for (; i < list.size(); i++) { final PathPartEntryJSO part = list.get(i); if (part.getCommand() != PathPartEntryJSO.MOVETO_ABSOLUTE) { if (i != 0) { // Atleast one M was found, so move back to it i--; } break; } } return i; }
public static int skipRedundantLeadingMoveTo(final PathPartList list) { int i = 0; for (; i < list.size(); i++) { final PathPartEntryJSO part = list.get(i); if (part.getCommand() != PathPartEntryJSO.MOVETO_ABSOLUTE) { if (i != 0) { // Atleast one M was found, so move back to it i--; } break; } } return i; }
public static int skipRedundantLeadingMoveTo(final PathPartList list) { int i = 0; for (; i < list.size(); i++) { final PathPartEntryJSO part = list.get(i); if (part.getCommand() != PathPartEntryJSO.MOVETO_ABSOLUTE) { if (i != 0) { // Atleast one M was found, so move back to it i--; } break; } } return i; }
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; } } } } } }
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; } } } } } }
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; } } } } } }
final PathPartEntryJSO entry = pathPart.get(i); final NFastDoubleArrayJSO points = entry.getPoints();
final PathPartEntryJSO entry = pathPart.get(i); final NFastDoubleArrayJSO points = entry.getPoints();
final PathPartEntryJSO entry = pathPart.get(i); final NFastDoubleArrayJSO points = entry.getPoints();
final PathPartEntryJSO pathPartEntry = list.get(i);
final PathPartEntryJSO pathPartEntry = list.get(i);
final PathPartEntryJSO pathPartEntry = list.get(i);
@Override public void onNodeDragMove(final NodeDragMoveEvent event) { if ((m_handle.isActive()) && (m_chlist.isActive())) { final double dx = event.getDragContext().getDistanceAdjusted().getX(); final double dy = event.getDragContext().getDistanceAdjusted().getY(); final PathPartList list = m_listOfPaths.get(m_handle.getPathIndex()); final PathPartEntryJSO entry = list.get(m_handle.getEntryIndex()); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final NFastDoubleArrayJSO doubles = m_entries.get(m_handle.getEntryIndex()); final double x = doubles.get(0); final double y = doubles.get(1); points.set(0, x + dx); points.set(1, y + dy); break; } } m_shape.resetBoundingBox(); m_shape.getLayer().batch(); } }
@Override public void onNodeDragMove(final NodeDragMoveEvent event) { if ((m_handle.isActive()) && (m_chlist.isActive())) { final double dx = event.getDragContext().getDistanceAdjusted().getX(); final double dy = event.getDragContext().getDistanceAdjusted().getY(); final PathPartList list = m_listOfPaths.get(m_handle.getPathIndex()); final PathPartEntryJSO entry = list.get(m_handle.getEntryIndex()); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final NFastDoubleArrayJSO doubles = m_entries.get(m_handle.getEntryIndex()); final double x = doubles.get(0); final double y = doubles.get(1); points.set(0, x + dx); points.set(1, y + dy); break; } } m_shape.resetBoundingBox(); m_shape.getLayer().batch(); } }
@Override public void onNodeDragMove(final NodeDragMoveEvent event) { if ((m_handle.isActive()) && (m_chlist.isActive())) { final double dx = event.getDragContext().getDistanceAdjusted().getX(); final double dy = event.getDragContext().getDistanceAdjusted().getY(); final PathPartList list = m_listOfPaths.get(m_handle.getPathIndex()); final PathPartEntryJSO entry = list.get(m_handle.getEntryIndex()); final NFastDoubleArrayJSO points = entry.getPoints(); switch (entry.getCommand()) { case PathPartEntryJSO.MOVETO_ABSOLUTE: case PathPartEntryJSO.LINETO_ABSOLUTE: { final NFastDoubleArrayJSO doubles = m_entries.get(m_handle.getEntryIndex()); final double x = doubles.get(0); final double y = doubles.get(1); points.set(0, x + dx); points.set(1, y + dy); break; } } m_shape.resetBoundingBox(); m_shape.getLayer().batch(); } }
final PathPartEntryJSO part = get(i);