/** * Returns the curve the label curve is too be based on */ protected mxPoint[] getBaseLabelCurve() { return getCurvePoints(CORE_CURVE); }
/** * Returns the curve the label curve is too be based on */ protected mxPoint[] getBaseLabelCurve() { return getCurvePoints(CORE_CURVE); }
/** Whether or not the label curve starts from the end target * and traces to the start of the branch * @return whether the label curve is reversed */ public boolean isLabelReversed() { if (valid) { mxPoint[] centralCurve = getCurvePoints(CORE_CURVE); if (centralCurve != null) { double changeX = centralCurve[centralCurve.length - 1].getX() - centralCurve[0].getX(); if (changeX < 0) { return true; } } } return false; }
/** * */ protected void paintPolyline(mxGraphics2DCanvas canvas, List<mxPoint> points, Map<String, Object> style) { double scale = canvas.getScale(); validateCurve(points, scale, style); canvas.paintPolyline(curve.getCurvePoints(mxCurve.CORE_CURVE), false); }
/** Whether or not the label curve starts from the end target * and traces to the start of the branch * @return whether the label curve is reversed */ public boolean isLabelReversed() { if (valid) { mxPoint[] centralCurve = getCurvePoints(CORE_CURVE); if (centralCurve != null) { double changeX = centralCurve[centralCurve.length - 1].getX() - centralCurve[0].getX(); if (changeX < 0) { return true; } } } return false; }
/** * */ protected void paintPolyline(mxGraphics2DCanvas canvas, List<mxPoint> points, Map<String, Object> style) { double scale = canvas.getScale(); validateCurve(points, scale, style); canvas.paintPolyline(curve.getCurvePoints(mxCurve.CORE_CURVE), false); }
/** * Returns the point at which this curve intersects the boundary of * the given rectangle, if it does so. If it does not intersect, * null is returned. If it intersects multiple times, the first * intersection from the start end of the curve is returned. * * @param index the curve index specifying the curve to analyse * @param rect the whose boundary is to be tested for intersection * with this curve * @return the point at which this curve intersects the boundary of * the given rectangle, if it does so. If it does not intersect, * null is returned. */ public mxPoint intersectsRectPerimeter(String index, mxRectangle rect) { mxPoint result = null; mxPoint[] pointsCurve = getCurvePoints(index); if (pointsCurve != null && pointsCurve.length > 1) { int crossingSeg = intersectRectPerimeterSeg(index, rect); if (crossingSeg != -1) { result = intersectRectPerimeterPoint(index, rect, crossingSeg); } } return result; }
/** * Returns the point at which this curve intersects the boundary of * the given rectangle, if it does so. If it does not intersect, * null is returned. If it intersects multiple times, the first * intersection from the start end of the curve is returned. * * @param index the curve index specifying the curve to analyse * @param rect the whose boundary is to be tested for intersection * with this curve * @return the point at which this curve intersects the boundary of * the given rectangle, if it does so. If it does not intersect, * null is returned. */ public mxPoint intersectsRectPerimeter(String index, mxRectangle rect) { mxPoint result = null; mxPoint[] pointsCurve = getCurvePoints(index); if (pointsCurve != null && pointsCurve.length > 1) { int crossingSeg = intersectRectPerimeterSeg(index, rect); if (crossingSeg != -1) { result = intersectRectPerimeterPoint(index, rect, crossingSeg); } } return result; }
/** * Returns the point at which this curve segment intersects the boundary * of the given rectangle, if it does so. If it does not intersect, * null is returned. * * @param curveIndex the curve index specifying the curve to analyse * @param rect the whose boundary is to be tested for intersection * with this curve * @param indexSeg the segments on this curve being checked * @return the point at which this curve segment intersects the boundary * of the given rectangle, if it does so. If it does not intersect, * null is returned. */ protected mxPoint intersectRectPerimeterPoint(String curveIndex, mxRectangle rect, int indexSeg) { mxPoint result = null; mxPoint[] pointsCurve = getCurvePoints(curveIndex); if (pointsCurve != null && pointsCurve.length > 1 && indexSeg >= 0 && indexSeg < pointsCurve.length) { double p1X = pointsCurve[indexSeg - 1].getX(); double p1Y = pointsCurve[indexSeg - 1].getY(); double p2X = pointsCurve[indexSeg].getX(); double p2Y = pointsCurve[indexSeg].getY(); result = rect.intersectLine(p1X, p1Y, p2X, p2Y); } return result; }
/** * Returns the point at which this curve segment intersects the boundary * of the given rectangle, if it does so. If it does not intersect, * null is returned. * * @param curveIndex the curve index specifying the curve to analyse * @param rect the whose boundary is to be tested for intersection * with this curve * @param indexSeg the segments on this curve being checked * @return the point at which this curve segment intersects the boundary * of the given rectangle, if it does so. If it does not intersect, * null is returned. */ protected mxPoint intersectRectPerimeterPoint(String curveIndex, mxRectangle rect, int indexSeg) { mxPoint result = null; mxPoint[] pointsCurve = getCurvePoints(curveIndex); if (pointsCurve != null && pointsCurve.length > 1 && indexSeg >= 0 && indexSeg < pointsCurve.length) { double p1X = pointsCurve[indexSeg - 1].getX(); double p1Y = pointsCurve[indexSeg - 1].getY(); double p2X = pointsCurve[indexSeg].getX(); double p2Y = pointsCurve[indexSeg].getY(); result = rect.intersectLine(p1X, p1Y, p2X, p2Y); } return result; }
int startSegment) mxPoint[] pointsCurve = getCurvePoints(index);
int startSegment) mxPoint[] pointsCurve = getCurvePoints(index);
mxPoint[] pointsCurve = getCurvePoints(index); double[] curveIntervals = getIntervals(index);
mxPoint[] pointsCurve = getCurvePoints(index); double[] curveIntervals = getIntervals(index);
mxPoint[] pointsCurve = getCurvePoints(mxCurve.CORE_CURVE);
mxPoint[] pointsCurve = getCurvePoints(mxCurve.CORE_CURVE);
mxPoint[] pointsCurve = getCurvePoints(index); double[] curveIntervals = getIntervals(index);
mxPoint[] pointsCurve = getCurvePoints(index); double[] curveIntervals = getIntervals(index);
mxPoint[] pointsCurve = getCurvePoints(index);
mxPoint[] pointsCurve = getCurvePoints(index);