public void move(Point2D a_delta) { int i; for (i = 0; i < m_actives.size(); i++) { GlyphObject active = m_actives.get(i); active.move(a_delta); } // for i }
public void display(Graphics2D g, AffineTransform a_trans) { Iterator i = createIterator(); while (i.hasNext()) { GlyphObject object = (GlyphObject) i.next(); object.display(g, a_trans); } // while }
public void remove() { if (!m_actives.hasSelected()) return; int i; for (i = 0; i < m_actives.size(); i++) { GlyphObject active = m_actives.get(i); active.remove(); } // for i m_history.record("remove"); m_actives.unselectAll(); }
/** * converts this glyph into Shape. It could be called for root's preview mode or by include * invoke. Pushing either this GlyphFile or DIncludeInvoke should be handled before this. */ public Shape toShape(AffineTransform a_trans) { int ppem = k_defaultPixelSize; GeneralPath retval = new GeneralPath(); Iterator i = createIterator(); while (i.hasNext()) { GlyphObject object = (GlyphObject) i.next(); if (object instanceof EContourPoint || object instanceof EHint) { continue; } // if retval.append(object.toShape(a_trans, ppem), false); } // if return retval; }
private boolean hitObjects(Rectangle2D a_rect, boolean a_isSelectOnlyOne) { boolean retval = false; Iterator i = new SelectionIterator(this); // loop the iterator in reverse order of drawing while (i.hasNext()) { GlyphObject object = (GlyphObject) i.next(); if (!object.hit(a_rect, new AffineTransform())) { continue; } // if retval = true; if (a_isSelectOnlyOne) { return true; } // if } // while i return retval; }