public Line(double x1, double y1, double x2, double y2) { m_description = VertexDescriptionDesignerImpl.getDefaultDescriptor2D(); setStartXY(x1, y1); setEndXY(x2, y2); }
public Line(double x1, double y1, double x2, double y2) { m_description = VertexDescriptionDesignerImpl.getDefaultDescriptor2D(); setStartXY(x1, y1); setEndXY(x2, y2); }
m_helper_line_2 = new Line(); m_helper_line_1.setStartXY(command.m_from); m_helper_line_1.setEndXY(command.m_to); m_helper_line_2.setStartXY(command_next.m_from); m_helper_line_2.setEndXY(command_next.m_to);
m_helper_line_2 = new Line(); m_helper_line_1.setStartXY(command.m_from); m_helper_line_1.setEndXY(command.m_to); m_helper_line_2.setStartXY(command_next.m_from); m_helper_line_2.setEndXY(command_next.m_to);
public Object readResolve() throws ObjectStreamException { Line ln = null; if (descriptionBitMask == -1) return null; try { VertexDescription vd = VertexDescriptionDesignerImpl .getVertexDescription(descriptionBitMask); ln = new Line(vd); if (attribs != null) { ln.setStartXY(attribs[0], attribs[1]); ln.setEndXY(attribs[2], attribs[3]); int index = 4; for (int i = 1, n = vd.getAttributeCount(); i < n; i++) { int semantics = vd.getSemantics(i); int comps = VertexDescription.getComponentCount(semantics); for (int ord = 0; ord < comps; ord++) { ln.setStartAttribute(semantics, ord, attribs[index++]); ln.setEndAttribute(semantics, ord, attribs[index++]); } } } } catch (Exception ex) { throw new InvalidObjectException("Cannot read geometry from stream"); } return ln; }
public Object readResolve() throws ObjectStreamException { Line ln = null; if (descriptionBitMask == -1) return null; try { VertexDescription vd = VertexDescriptionDesignerImpl .getVertexDescription(descriptionBitMask); ln = new Line(vd); if (attribs != null) { ln.setStartXY(attribs[0], attribs[1]); ln.setEndXY(attribs[2], attribs[3]); int index = 4; for (int i = 1, n = vd.getAttributeCount(); i < n; i++) { int semantics = vd.getSemantics(i); int comps = VertexDescription.getComponentCount(semantics); for (int ord = 0; ord < comps; ord++) { ln.setStartAttribute(semantics, ord, attribs[index++]); ln.setEndAttribute(semantics, ord, attribs[index++]); } } } } catch (Exception ex) { throw new InvalidObjectException("Cannot read geometry from stream"); } return ln; }
boolean queryLineConnector(int vertex, Line line) { int next = getNextVertex(vertex); if (next == -1) return false; if (!m_b_has_attributes) { Point2D pt = new Point2D(); getXY(vertex, pt); line.setStartXY(pt); getXY(next, pt); line.setEndXY(pt); } else { Point pt = new Point(); queryPoint(vertex, pt); line.setStart(pt); queryPoint(next, pt); line.setEnd(pt); } return true; }
boolean queryLineConnector(int vertex, Line line) { int next = getNextVertex(vertex); if (next == -1) return false; if (!m_b_has_attributes) { Point2D pt = new Point2D(); getXY(vertex, pt); line.setStartXY(pt); getXY(next, pt); line.setEndXY(pt); } else { Point pt = new Point(); queryPoint(vertex, pt); line.setStart(pt); queryPoint(next, pt); line.setEnd(pt); } return true; }
Geometry _OffsetLine() { Line line = (Line) m_inputGeometry; Point2D start = line.getStartXY(); Point2D end = line.getEndXY(); Point2D v = new Point2D(); v.sub(end, start); v.normalize(); v.leftPerpendicular(); v.scale(m_distance); start.add(v); end.add(v); Line resLine = (Line) line.createInstance(); line.setStartXY(start); line.setEndXY(end); return resLine; }
Geometry _OffsetLine() { Line line = (Line) m_inputGeometry; Point2D start = line.getStartXY(); Point2D end = line.getEndXY(); Point2D v = new Point2D(); v.sub(end, start); v.normalize(); v.leftPerpendicular(); v.scale(m_distance); start.add(v); end.add(v); Line resLine = (Line) line.createInstance(); line.setStartXY(start); line.setEndXY(end); return resLine; }
Point2D pt = new Point2D(); env_a.queryLowerLeft(pt); line_a.setStartXY(pt); env_a.queryUpperRight(pt); line_a.setEndXY(pt); env_b.queryLowerLeft(pt); line_b.setStartXY(pt); env_b.queryUpperRight(pt); line_b.setEndXY(pt);
Point2D pt = new Point2D(); env_a.queryLowerLeft(pt); line_a.setStartXY(pt); env_a.queryUpperRight(pt); line_a.setEndXY(pt); env_b.queryLowerLeft(pt); line_b.setStartXY(pt); env_b.queryUpperRight(pt); line_b.setEndXY(pt);
Point2D pt = new Point2D(); _env_a.queryLowerLeft(pt); line_a.setStartXY(pt); _env_a.queryUpperRight(pt); line_a.setEndXY(pt); _env_b.queryLowerLeft(pt); line_b.setStartXY(pt); _env_b.queryUpperRight(pt); line_b.setEndXY(pt);
Point2D pt = new Point2D(); _env_a.queryLowerLeft(pt); line_a.setStartXY(pt); _env_a.queryUpperRight(pt); line_a.setEndXY(pt); _env_b.queryLowerLeft(pt); line_b.setStartXY(pt); _env_b.queryUpperRight(pt); line_b.setEndXY(pt);
Point2D pt = new Point2D(); _env_a.queryLowerLeft(pt); line_a.setStartXY(pt); _env_a.queryUpperRight(pt); line_a.setEndXY(pt); _env_b.queryLowerLeft(pt); line_b.setStartXY(pt); _env_b.queryUpperRight(pt); line_b.setEndXY(pt);
Point2D pt = new Point2D(); _env_a.queryLowerLeft(pt); line_a.setStartXY(pt); _env_a.queryUpperRight(pt); line_a.setEndXY(pt); _env_b.queryLowerLeft(pt); line_b.setStartXY(pt); _env_b.queryUpperRight(pt); line_b.setEndXY(pt);
int i2 = stack.getLast(); mpsrc.getXY(i1, pt); lineHelper.setStartXY(pt); mpsrc.getXY(i2, pt); lineHelper.setEndXY(pt);
int i2 = stack.getLast(); mpsrc.getXY(i1, pt); lineHelper.setStartXY(pt); mpsrc.getXY(i2, pt); lineHelper.setEndXY(pt);