public ChartRenderingInfo(EntityCollection entities) { base.\u002Ector(); ChartRenderingInfo chartRenderingInfo = this; this.chartArea = (Rectangle2D) new Rectangle2D.Double(); this.plotInfo = new PlotRenderingInfo(this); this.entities = entities; }
public PlotRenderingInfo(ChartRenderingInfo owner) { base.\u002Ector(); PlotRenderingInfo plotRenderingInfo = this; this.owner = owner; this.dataArea = (Rectangle2D) new Rectangle2D.Double(); this.subplotInfo = (List) new ArrayList(); }
public ArrowPanel(int type) { base.\u002Ector(); ArrowPanel arrowPanel = this; this.type = 0; this.available = (Rectangle2D) new Rectangle2D.Float(); this.type = type; ((JComponent) this).setPreferredSize(new Dimension(14, 9)); }
public virtual void draw(Graphics2D g2, Rectangle2D area) { area = this.trimMargin(area); this.drawBorder(g2, area); area = this.trimBorder(area); area = this.trimPadding(area); g2.setPaint(this.paint); g2.fill((Shape) area); }
protected internal AbstractBlock() { base.\u002Ector(); AbstractBlock abstractBlock = this; this.id = (string) null; this.width = 0.0; this.height = 0.0; this.bounds = (Rectangle2D) new Rectangle2D.Float(); this.margin = RectangleInsets.__\u003C\u003EZERO_INSETS; this.frame = (BlockFrame) BlockBorder.__\u003C\u003ENONE; this.padding = RectangleInsets.__\u003C\u003EZERO_INSETS; }
public static void align(Rectangle2D rect, Rectangle2D frame, int align) { double num1 = ((RectangularShape) frame).getCenterX() - ((RectangularShape) rect).getWidth() / 2.0; double num2 = ((RectangularShape) frame).getCenterY() - ((RectangularShape) rect).getHeight() / 2.0; double width = ((RectangularShape) rect).getWidth(); double height = ((RectangularShape) rect).getHeight(); if ((align & 3) == 3) height = ((RectangularShape) frame).getHeight(); if ((align & 12) == 12) width = ((RectangularShape) frame).getWidth(); if ((align & 1) == 1) num2 = ((RectangularShape) frame).getMinY(); if ((align & 2) == 2) num2 = ((RectangularShape) frame).getMaxY() - height; if ((align & 4) == 4) num1 = ((RectangularShape) frame).getX(); if ((align & 8) == 8) num1 = ((RectangularShape) frame).getMaxX() - width; rect.setRect(num1, num2, width, height); }
protected internal virtual Size2D drawHorizontal(Graphics2D g2, Rectangle2D chartArea) { double width = this.getWidth(); double height = this.getHeight(); RectangleInsets padding = this.getPadding(); double num1 = padding.calculateTopOutset(height); double num2 = padding.calculateBottomOutset(height); double num3 = padding.calculateLeftOutset(width); double num4 = padding.calculateRightOutset(width); double num5 = this.getPosition() != RectangleEdge.__\u003C\u003ETOP ? ((RectangularShape) chartArea).getY() + ((RectangularShape) chartArea).getHeight() - num2 - height : ((RectangularShape) chartArea).getY() + num1; HorizontalAlignment horizontalAlignment = this.getHorizontalAlignment(); double num6 = 0.0; if (horizontalAlignment == HorizontalAlignment.__\u003C\u003ECENTER) num6 = ((RectangularShape) chartArea).getX() + num3 + ((RectangularShape) chartArea).getWidth() / 2.0 - width / 2.0; else if (horizontalAlignment == HorizontalAlignment.__\u003C\u003ELEFT) num6 = ((RectangularShape) chartArea).getX() + num3; else if (horizontalAlignment == HorizontalAlignment.__\u003C\u003ERIGHT) num6 = ((RectangularShape) chartArea).getX() + ((RectangularShape) chartArea).getWidth() - num4 - width; ((Graphics) g2).drawImage(this.image, ByteCodeHelper.d2i(num6), ByteCodeHelper.d2i(num5), ByteCodeHelper.d2i(width), ByteCodeHelper.d2i(height), (ImageObserver) null); return new Size2D(((RectangularShape) chartArea).getWidth() + num3 + num4, height + num1 + num2); }
protected internal virtual List refreshVerticalTicks(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) { ArrayList arrayList = new ArrayList(); ((List) arrayList).clear(); Font tickLabelFont = this.getTickLabelFont(); ((Graphics) g2).setFont(tickLabelFont); if (this.isAutoTickUnitSelection()) this.selectAutoTickUnit(g2, dataArea, edge); double size = this.getTickUnit().getSize(); double cycleBound = this.getCycleBound(); double num1 = Math.ceil(cycleBound / size) * size; double num2 = this.getRange().getUpperBound(); int num3 = 0; int num4 = this.boundMappedToLastCycle ? 1 : 0; this.boundMappedToLastCycle = true; CyclicNumberAxis.CycleBoundTick cycleBoundTick1 = (CyclicNumberAxis.CycleBoundTick) null; float num5 = 0.0f; if (num2 == cycleBound) { num1 = this.calculateLowestVisibleTickValue(); num3 = 1; this.boundMappedToLastCycle = true; } while (num1 <= num2) { int num6 = 0; if (num1 + size > num2 && num3 == 0) num6 = 1; double num7 = this.valueToJava2D(num1, dataArea, edge); NumberFormat numberFormatOverride = this.getNumberFormatOverride(); string label = numberFormatOverride == null ? this.getTickUnit().valueToString(num1) : numberFormatOverride.format(num1); float num8 = (float) num7; double angle = 0.0; TextAnchor textAnchor1; TextAnchor rotationAnchor; if (this.isVerticalTickLabels()) { if (edge == RectangleEdge.__\u003C\u003ELEFT) { textAnchor1 = TextAnchor.__\u003C\u003EBOTTOM_CENTER; if (cycleBoundTick1 != null && (double) num5 == (double) num8 && num1 != cycleBound) { TextAnchor textAnchor2 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_RIGHT : TextAnchor.__\u003C\u003EBOTTOM_LEFT; ((List) arrayList).remove(((List) arrayList).size() - 1); ((List) arrayList).add((object) new CyclicNumberAxis.CycleBoundTick(this.boundMappedToLastCycle, cycleBoundTick1.getNumber(), cycleBoundTick1.getText(), textAnchor2, textAnchor2, cycleBoundTick1.getAngle())); this.internalMarkerWhenTicksOverlap = true; textAnchor1 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_LEFT : TextAnchor.__\u003C\u003EBOTTOM_RIGHT; } rotationAnchor = textAnchor1; angle = -1.0 * Math.PI / 2.0; } else { textAnchor1 = TextAnchor.__\u003C\u003EBOTTOM_CENTER; if (cycleBoundTick1 != null && (double) num5 == (double) num8 && num1 != cycleBound) { TextAnchor textAnchor2 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_LEFT : TextAnchor.__\u003C\u003EBOTTOM_RIGHT; ((List) arrayList).remove(((List) arrayList).size() - 1); ((List) arrayList).add((object) new CyclicNumberAxis.CycleBoundTick(this.boundMappedToLastCycle, cycleBoundTick1.getNumber(), cycleBoundTick1.getText(), textAnchor2, textAnchor2, cycleBoundTick1.getAngle())); this.internalMarkerWhenTicksOverlap = true; textAnchor1 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_RIGHT : TextAnchor.__\u003C\u003EBOTTOM_LEFT; } rotationAnchor = textAnchor1; angle = Math.PI / 2.0; } } else if (edge == RectangleEdge.__\u003C\u003ELEFT) { textAnchor1 = TextAnchor.__\u003C\u003ECENTER_RIGHT; if (cycleBoundTick1 != null && (double) num5 == (double) num8 && num1 != cycleBound) { TextAnchor textAnchor2 = !this.isInverted() ? TextAnchor.__\u003C\u003ETOP_RIGHT : TextAnchor.__\u003C\u003EBOTTOM_RIGHT; ((List) arrayList).remove(((List) arrayList).size() - 1); ((List) arrayList).add((object) new CyclicNumberAxis.CycleBoundTick(this.boundMappedToLastCycle, cycleBoundTick1.getNumber(), cycleBoundTick1.getText(), textAnchor2, textAnchor2, cycleBoundTick1.getAngle())); this.internalMarkerWhenTicksOverlap = true; textAnchor1 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_RIGHT : TextAnchor.__\u003C\u003ETOP_RIGHT; } rotationAnchor = textAnchor1; } else { textAnchor1 = TextAnchor.__\u003C\u003ECENTER_LEFT; if (cycleBoundTick1 != null && (double) num5 == (double) num8 && num1 != cycleBound) { TextAnchor textAnchor2 = !this.isInverted() ? TextAnchor.__\u003C\u003ETOP_LEFT : TextAnchor.__\u003C\u003EBOTTOM_LEFT; ((List) arrayList).remove(((List) arrayList).size() - 1); ((List) arrayList).add((object) new CyclicNumberAxis.CycleBoundTick(this.boundMappedToLastCycle, cycleBoundTick1.getNumber(), cycleBoundTick1.getText(), textAnchor2, textAnchor2, cycleBoundTick1.getAngle())); this.internalMarkerWhenTicksOverlap = true; textAnchor1 = !this.isInverted() ? TextAnchor.__\u003C\u003EBOTTOM_LEFT : TextAnchor.__\u003C\u003ETOP_LEFT; } rotationAnchor = textAnchor1; } CyclicNumberAxis.CycleBoundTick cycleBoundTick2 = new CyclicNumberAxis.CycleBoundTick(this.boundMappedToLastCycle, (Number) new Double(num1), label, textAnchor1, rotationAnchor, angle); if (num1 == cycleBound) this.internalMarkerCycleBoundTick = (Tick) cycleBoundTick2; ((List) arrayList).add((object) cycleBoundTick2); cycleBoundTick1 = cycleBoundTick2; num5 = num8; if (num1 == cycleBound) this.internalMarkerCycleBoundTick = (Tick) cycleBoundTick2; num1 += size; if (num6 != 0) { num1 = this.calculateLowestVisibleTickValue(); num2 = cycleBound; num3 = 1; this.boundMappedToLastCycle = false; } } this.boundMappedToLastCycle = num4 != 0; return (List) arrayList; }
public virtual void setPieArea(Rectangle2D area) { this.pieArea = area; }
public virtual void setLinkArea(Rectangle2D area) { this.linkArea = area; }
awt.PaintContext awt.Paint.createContext(image.ColorModel cm, awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform, awt.RenderingHints hints) { return(createContextInternal(cm, deviceBounds, userBounds, xform, hints)); }
public bool contains(Rectangle2D r) { return contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); }
public override XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset data, PlotRenderingInfo info) { XYLineAndShapeRenderer.State state = (XYLineAndShapeRenderer.State) base.initialise(g2, dataArea, plot, data, info); state.setProcessVisibleItemsOnly(false); this.points = new Vector(); this.setDrawSeriesLineAsPath(true); return (XYItemRendererState) state; }
protected internal override List refreshTicksHorizontal(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) { ArrayList arrayList = new ArrayList(); Range range = this.getRange(); double val1 = range.getLowerBound(); if (this.smallLogFlag && val1 < 1E-100) val1 = 1E-100; double upperBound = range.getUpperBound(); int num1 = ByteCodeHelper.d2i(Math.rint(this.switchedLog10(val1))); int num2 = ByteCodeHelper.d2i(Math.rint(this.switchedLog10(upperBound))); if (num1 == num2 && num1 > 0 && Math.pow(10.0, (double) num1) > val1) num1 += -1; int num3 = 0; for (int index1 = num1; index1 <= num2; ++index1) { for (int index2 = 0; index2 < 10; ++index2) { double val2; string label; if (this.smallLogFlag) { val2 = Math.pow(10.0, (double) index1) + Math.pow(10.0, (double) index1) * (double) index2; if (this.expTickLabelsFlag || index1 < 0 && val2 > 0.0 && val2 < 1.0) { if (index2 == 0 || index1 > -4 && index2 < 2 || val2 >= upperBound) { this.__\u003C\u003EnumberFormatterObj.setMaximumFractionDigits(-index1); label = this.makeTickLabel(val2, true); } else label = ""; } else label = index2 < 1 || index1 < 1 && index2 < 5 || (index2 < 4 - index1 || val2 >= upperBound) ? this.makeTickLabel(val2) : ""; } else { if (num3 != 0) index2 += -1; val2 = index1 < 0 ? -(Math.pow(10.0, (double) -index1) - Math.pow(10.0, (double) (-index1 - 1)) * (double) index2) : Math.pow(10.0, (double) index1) + Math.pow(10.0, (double) index1) * (double) index2; if (num3 == 0) { if (Math.abs(val2 - 1.0) < 0.0001 && val1 <= 0.0 && upperBound >= 0.0) { val2 = 0.0; num3 = 1; } } else num3 = 0; label = this.expTickLabelsFlag && index2 < 2 || index2 < 1 || (index1 < 1 && index2 < 5 || (index2 < 4 - index1 || val2 >= upperBound)) ? this.makeTickLabel(val2) : ""; } if (val2 > upperBound) return (List) arrayList; if (val2 >= val1 - 1E-100) { double angle = 0.0; TextAnchor textAnchor; TextAnchor rotationAnchor; if (this.isVerticalTickLabels()) { textAnchor = TextAnchor.__\u003C\u003ECENTER_RIGHT; rotationAnchor = TextAnchor.__\u003C\u003ECENTER_RIGHT; angle = edge != RectangleEdge.__\u003C\u003ETOP ? -1.0 * Math.PI / 2.0 : Math.PI / 2.0; } else if (edge == RectangleEdge.__\u003C\u003ETOP) { textAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; rotationAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; } else { textAnchor = TextAnchor.__\u003C\u003ETOP_CENTER; rotationAnchor = TextAnchor.__\u003C\u003ETOP_CENTER; } NumberTick numberTick = new NumberTick((Number) new Double(val2), label, textAnchor, rotationAnchor, angle); ((List) arrayList).add((object) numberTick); } } } return (List) arrayList; }
public override double valueToJava2D(double value, Rectangle2D plotArea, RectangleEdge edge) { Range range = this.getRange(); double num1 = this.switchedLog10(range.getLowerBound()); double num2 = this.switchedLog10(range.getUpperBound()); double num3 = 0.0; double num4 = 0.0; if (RectangleEdge.isTopOrBottom(edge)) { num3 = ((RectangularShape) plotArea).getMinX(); num4 = ((RectangularShape) plotArea).getMaxX(); } else if (RectangleEdge.isLeftOrRight(edge)) { num3 = ((RectangularShape) plotArea).getMaxY(); num4 = ((RectangularShape) plotArea).getMinY(); } value = this.switchedLog10(value); if (this.isInverted()) return num4 - (value - num1) / (num2 - num1) * (num4 - num3); else return num3 + (value - num1) / (num2 - num1) * (num4 - num3); }
protected internal override float[] calculateAnchorPoint(ValueTick tick, double cursor, Rectangle2D dataArea, RectangleEdge edge) { if (tick is CyclicNumberAxis.CycleBoundTick) { int num = this.boundMappedToLastCycle ? 1 : 0; this.boundMappedToLastCycle = ((CyclicNumberAxis.CycleBoundTick) tick).mapToLastCycle; float[] numArray = base.calculateAnchorPoint(tick, cursor, dataArea, edge); this.boundMappedToLastCycle = num != 0; return numArray; } else return base.calculateAnchorPoint(tick, cursor, dataArea, edge); }
protected internal virtual void selectVerticalAutoTickUnit(Graphics2D g2, Rectangle2D drawArea, Rectangle2D dataArea, RectangleEdge edge) { this.setTickUnit((NumberTickUnit) this.getStandardTickUnits().getCeilingTickUnit(this.getRange().getLength() * this.estimateMaximumTickLabelWidth(g2, (TickUnit) this.getTickUnit()) / ((RectangularShape) dataArea).getHeight()), false, false); }
public override double valueToJava2D(double value, Rectangle2D dataArea, RectangleEdge edge) { Range range = this.getRange(); double lowerBound = range.getLowerBound(); double upperBound = range.getUpperBound(); double cycleBound = this.getCycleBound(); if (value < lowerBound || value > upperBound) return double.NaN; double num1 = 0.0; double num2 = 0.0; if (RectangleEdge.isTopOrBottom(edge)) { num1 = ((RectangularShape) dataArea).getMinX(); num2 = ((RectangularShape) dataArea).getMaxX(); } else if (RectangleEdge.isLeftOrRight(edge)) { num2 = ((RectangularShape) dataArea).getMinY(); num1 = ((RectangularShape) dataArea).getMaxY(); } if (this.isInverted()) { if (value == cycleBound) { if (this.boundMappedToLastCycle) return num1; else return num2; } else if (value > cycleBound) return num2 - (value - cycleBound) * (num2 - num1) / this.period; else return num1 + (cycleBound - value) * (num2 - num1) / this.period; } else if (value == cycleBound) { if (this.boundMappedToLastCycle) return num2; else return num1; } else if (value >= cycleBound) return num1 + (value - cycleBound) * (num2 - num1) / this.period; else return num2 - (cycleBound - value) * (num2 - num1) / this.period; }
public override double java2DToValue(double java2DValue, Rectangle2D plotArea, RectangleEdge edge) { Range range = this.getRange(); double num1 = this.switchedLog10(range.getLowerBound()); double num2 = this.switchedLog10(range.getUpperBound()); double num3 = 0.0; double num4 = 0.0; if (RectangleEdge.isTopOrBottom(edge)) { num3 = ((RectangularShape) plotArea).getX(); num4 = ((RectangularShape) plotArea).getMaxX(); } else if (RectangleEdge.isLeftOrRight(edge)) { num3 = ((RectangularShape) plotArea).getMaxY(); num4 = ((RectangularShape) plotArea).getMinY(); } if (this.isInverted()) return this.switchedPow10(num2 - (java2DValue - num3) / (num4 - num3) * (num2 - num1)); else return this.switchedPow10(num1 + (java2DValue - num3) / (num4 - num3) * (num2 - num1)); }
public override double java2DToValue(double java2DValue, Rectangle2D dataArea, RectangleEdge edge) { double upperBound = this.getRange().getUpperBound(); double cycleBound = this.getCycleBound(); double num1 = 0.0; double num2 = 0.0; if (RectangleEdge.isTopOrBottom(edge)) { num1 = ((RectangularShape) dataArea).getMinX(); num2 = ((RectangularShape) dataArea).getMaxX(); } else if (RectangleEdge.isLeftOrRight(edge)) { num1 = ((RectangularShape) dataArea).getMaxY(); num2 = ((RectangularShape) dataArea).getMinY(); } if (this.isInverted()) { double num3 = num2 - (upperBound - cycleBound) * (num2 - num1) / this.period; if (java2DValue >= num3) return cycleBound + (num2 - java2DValue) * this.period / (num2 - num1); else return cycleBound - (java2DValue - num1) * this.period / (num2 - num1); } else { double num3 = (upperBound - cycleBound) * (num2 - num1) / this.period + num1; if (java2DValue <= num3) return cycleBound + (java2DValue - num1) * this.period / (num2 - num1); else return cycleBound - (num2 - java2DValue) * this.period / (num2 - num1); } }
protected internal override List refreshTicksVertical(Graphics2D g2, Rectangle2D dataArea, RectangleEdge edge) { ArrayList arrayList = new ArrayList(); double val = this.getRange().getLowerBound(); if (this.smallLogFlag && val < 1E-100) val = 1E-100; double upperBound = this.getRange().getUpperBound(); int num1 = ByteCodeHelper.d2i(Math.rint(this.switchedLog10(val))); int num2 = ByteCodeHelper.d2i(Math.rint(this.switchedLog10(upperBound))); if (num1 == num2 && num1 > 0 && Math.pow(10.0, (double) num1) > val) num1 += -1; int num3 = 0; for (int index1 = num1; index1 <= num2; ++index1) { int num4 = 10; if (index1 == num2) num4 = 1; for (int index2 = 0; index2 < num4; ++index2) { double num5; string label; if (this.smallLogFlag) { num5 = Math.pow(10.0, (double) index1) + Math.pow(10.0, (double) index1) * (double) index2; if (index2 == 0) { if (this.log10TickLabelsFlag) label = new StringBuffer().append("10^").append(index1).toString(); else if (this.expTickLabelsFlag) label = new StringBuffer().append("1e").append(index1).toString(); else if (index1 >= 0) { NumberFormat numberFormatOverride = this.getNumberFormatOverride(); label = numberFormatOverride == null ? Long.toString(ByteCodeHelper.d2l(Math.rint(num5))) : numberFormatOverride.format(num5); } else { this.__\u003C\u003EnumberFormatterObj.setMaximumFractionDigits(-index1); label = this.__\u003C\u003EnumberFormatterObj.format(num5); } } else label = ""; } else { if (num3 != 0) index2 += -1; num5 = index1 < 0 ? -(Math.pow(10.0, (double) -index1) - Math.pow(10.0, (double) (-index1 - 1)) * (double) index2) : Math.pow(10.0, (double) index1) + Math.pow(10.0, (double) index1) * (double) index2; if (index2 == 0) { if (num3 == 0) { if (index1 > num1 && index1 < num2 && Math.abs(num5 - 1.0) < 0.0001) { num5 = 0.0; num3 = 1; label = "0"; } else if (this.log10TickLabelsFlag) label = new StringBuffer().append(index1 >= 0 ? "" : "-").append("10^").append(Math.abs(index1)).toString(); else if (this.expTickLabelsFlag) { label = new StringBuffer().append(index1 >= 0 ? "" : "-").append("1e").append(Math.abs(index1)).toString(); } else { NumberFormat numberFormatOverride = this.getNumberFormatOverride(); label = numberFormatOverride == null ? Long.toString(ByteCodeHelper.d2l(Math.rint(num5))) : numberFormatOverride.format(num5); } } else { label = ""; num3 = 0; } } else { label = ""; num3 = 0; } } if (num5 > upperBound) return (List) arrayList; if (num5 >= val - 1E-100) { double angle = 0.0; TextAnchor textAnchor; TextAnchor rotationAnchor; if (this.isVerticalTickLabels()) { if (edge == RectangleEdge.__\u003C\u003ELEFT) { textAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; rotationAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; angle = -1.0 * Math.PI / 2.0; } else { textAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; rotationAnchor = TextAnchor.__\u003C\u003EBOTTOM_CENTER; angle = Math.PI / 2.0; } } else if (edge == RectangleEdge.__\u003C\u003ELEFT) { textAnchor = TextAnchor.__\u003C\u003ECENTER_RIGHT; rotationAnchor = TextAnchor.__\u003C\u003ECENTER_RIGHT; } else { textAnchor = TextAnchor.__\u003C\u003ECENTER_LEFT; rotationAnchor = TextAnchor.__\u003C\u003ECENTER_LEFT; } ((List) arrayList).add((object) new NumberTick((Number) new Double(num5), label, textAnchor, rotationAnchor, angle)); } } } return (List) arrayList; }
protected internal override AxisState drawTickMarksAndLabels(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge) { this.internalMarkerWhenTicksOverlap = false; AxisState axisState = base.drawTickMarksAndLabels(g2, cursor, plotArea, dataArea, edge); if (!this.internalMarkerWhenTicksOverlap) return axisState; double num1 = (double) this.getTickMarkOutsideLength(); FontMetrics fontMetrics = ((Graphics) g2).getFontMetrics(this.getTickLabelFont()); double num2 = !this.isVerticalTickLabels() ? (double) fontMetrics.getHeight() : (double) fontMetrics.getMaxAdvance(); double num3 = 0.0; if (this.isTickMarksVisible()) { float num4 = (float) this.valueToJava2D(this.getRange().getUpperBound(), dataArea, edge); Line2D.Double @double = (Line2D.Double) null; g2.setStroke(this.getTickMarkStroke()); g2.setPaint(this.getTickMarkPaint()); if (edge == RectangleEdge.__\u003C\u003ELEFT) @double = new Line2D.Double(cursor - num2, (double) num4, cursor + num3, (double) num4); else if (edge == RectangleEdge.__\u003C\u003ERIGHT) @double = new Line2D.Double(cursor + num2, (double) num4, cursor - num3, (double) num4); else if (edge == RectangleEdge.__\u003C\u003ETOP) @double = new Line2D.Double((double) num4, cursor - num2, (double) num4, cursor + num3); else if (edge == RectangleEdge.__\u003C\u003EBOTTOM) @double = new Line2D.Double((double) num4, cursor + num2, (double) num4, cursor - num3); g2.draw((Shape) @double); } return axisState; }
public bool intersects(Rectangle2D r) { return intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ()); }
public override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge, PlotRenderingInfo plotState) { AxisState axisState = base.draw(g2, cursor, plotArea, dataArea, edge, plotState); if (this.isAdvanceLineVisible()) { double num = this.valueToJava2D(this.getRange().getUpperBound(), dataArea, edge); Line2D.Double @double = (Line2D.Double) null; g2.setStroke(this.getAdvanceLineStroke()); g2.setPaint(this.getAdvanceLinePaint()); if (edge == RectangleEdge.__\u003C\u003ELEFT) @double = new Line2D.Double(cursor, num, cursor + ((RectangularShape) dataArea).getWidth(), num); else if (edge == RectangleEdge.__\u003C\u003ERIGHT) @double = new Line2D.Double(cursor - ((RectangularShape) dataArea).getWidth(), num, cursor, num); else if (edge == RectangleEdge.__\u003C\u003ETOP) @double = new Line2D.Double(num, cursor + ((RectangularShape) dataArea).getHeight(), num, cursor); else if (edge == RectangleEdge.__\u003C\u003EBOTTOM) @double = new Line2D.Double(num, cursor, num, cursor - ((RectangularShape) dataArea).getHeight()); g2.draw((Shape) @double); } return axisState; }
protected internal override void drawPrimaryLineAsPath(XYItemRendererState state, Graphics2D g2, XYPlot plot, XYDataset dataset, int pass, int series, int item, ValueAxis domainAxis, ValueAxis rangeAxis, Rectangle2D dataArea) { RectangleEdge domainAxisEdge = plot.getDomainAxisEdge(); RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge(); double xvalue = dataset.getXValue(series, item); double yvalue = dataset.getYValue(series, item); double num1 = domainAxis.valueToJava2D(xvalue, dataArea, domainAxisEdge); double num2 = rangeAxis.valueToJava2D(yvalue, dataArea, rangeAxisEdge); if (!Double.isNaN(num1) && !Double.isNaN(num2)) { XYSplineRenderer.ControlPoint controlPoint = new XYSplineRenderer.ControlPoint(this, plot.getOrientation() != PlotOrientation.__\u003C\u003EHORIZONTAL ? (float) num1 : (float) num2, plot.getOrientation() != PlotOrientation.__\u003C\u003EHORIZONTAL ? (float) num2 : (float) num1); if (!this.points.contains((object) controlPoint)) this.points.add((object) controlPoint); } if (item != dataset.getItemCount(series) - 1) return; XYLineAndShapeRenderer.State state1 = (XYLineAndShapeRenderer.State) state; if (this.points.size() > 1) { XYSplineRenderer.ControlPoint controlPoint1 = (XYSplineRenderer.ControlPoint) this.points.get(0); ((Path2D.Float) state1.seriesPath).moveTo(controlPoint1.x, controlPoint1.y); if (this.points.size() == 2) { XYSplineRenderer.ControlPoint controlPoint2 = (XYSplineRenderer.ControlPoint) this.points.get(1); ((Path2D.Float) state1.seriesPath).lineTo(controlPoint2.x, controlPoint2.y); } else { int length = this.points.size(); float[] numArray1 = new float[length]; float[] numArray2 = new float[length]; float[] numArray3 = new float[length]; float[] numArray4 = new float[length]; for (int index = 0; index < length; ++index) { XYSplineRenderer.ControlPoint controlPoint2 = (XYSplineRenderer.ControlPoint) this.points.get(index); numArray2[index] = controlPoint2.x; numArray1[index] = controlPoint2.y; } for (int index = 1; index <= length - 1; ++index) numArray4[index] = numArray2[index] - numArray2[index - 1]; float[] numArray5 = new float[length - 1]; float[] numArray6 = new float[length - 1]; float[] numArray7 = new float[length - 1]; for (int index = 1; index <= length - 2; ++index) { numArray6[index] = (numArray4[index] + numArray4[index + 1]) / 3f; numArray7[index] = numArray4[index + 1] / 6f; numArray5[index] = numArray4[index] / 6f; numArray3[index] = (numArray1[index + 1] - numArray1[index]) / numArray4[index + 1] - (numArray1[index] - numArray1[index - 1]) / numArray4[index]; } this.solveTridiag(numArray5, numArray6, numArray7, numArray3, length - 2); float num3 = numArray2[0]; float num4 = numArray1[0]; ((Path2D.Float) state1.seriesPath).moveTo(num3, num4); for (int index1 = 1; index1 <= length - 1; ++index1) { for (int index2 = 1; index2 <= this.precision; ++index2) { float num5 = numArray4[index1] * (float) index2 / (float) this.precision; float num6 = numArray4[index1] - num5; float num7 = (((float) (-(double) numArray3[index1 - 1] / 6.0) * (num6 + numArray4[index1]) * num5 + numArray1[index1 - 1]) * num6 + ((float) (-(double) numArray3[index1] / 6.0) * (num5 + numArray4[index1]) * num6 + numArray1[index1]) * num5) / numArray4[index1]; float num8 = numArray2[index1 - 1] + num5; ((Path2D.Float) state1.seriesPath).lineTo(num8, num7); } } } this.drawFirstPassShape(g2, pass, series, item, (Shape) state1.seriesPath); } this.points = new Vector(); }
public override AxisSpace reserveSpace(Graphics2D g2, Plot plot, Rectangle2D plotArea, RectangleEdge edge, AxisSpace space) { this.internalMarkerCycleBoundTick = (Tick) null; AxisSpace axisSpace = base.reserveSpace(g2, plot, plotArea, edge, space); if (this.internalMarkerCycleBoundTick == null) return axisSpace; FontMetrics fontMetrics = ((Graphics) g2).getFontMetrics(this.getTickLabelFont()); Rectangle2D textBounds = TextUtilities.getTextBounds(this.internalMarkerCycleBoundTick.getText(), g2, fontMetrics); if (RectangleEdge.isTopOrBottom(edge)) { if (this.isVerticalTickLabels()) space.add(((RectangularShape) textBounds).getHeight() / 2.0, RectangleEdge.__\u003C\u003ERIGHT); else space.add(((RectangularShape) textBounds).getWidth() / 2.0, RectangleEdge.__\u003C\u003ERIGHT); } else if (RectangleEdge.isLeftOrRight(edge)) { if (this.isVerticalTickLabels()) space.add(((RectangularShape) textBounds).getWidth() / 2.0, RectangleEdge.__\u003C\u003ETOP); else space.add(((RectangularShape) textBounds).getHeight() / 2.0, RectangleEdge.__\u003C\u003ETOP); } return axisSpace; }
public override void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) { Number number1 = dataset.getValue(row, column); if (number1 == null) return; double categoryMiddle1 = domainAxis.getCategoryMiddle(column, this.getColumnCount(), dataArea, plot.getDomainAxisEdge()); double num1 = rangeAxis.valueToJava2D(number1.doubleValue(), dataArea, plot.getRangeAxisEdge()); g2.setPaint(this.getItemPaint(row, column)); g2.setStroke(this.getItemStroke(row, column)); Rectangle2D.Double double1 = new Rectangle2D.Double(categoryMiddle1 - 4.0, num1 - 4.0, 8.0, 8.0); PlotOrientation orientation = plot.getOrientation(); if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num1)); else this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num1), ByteCodeHelper.d2i(categoryMiddle1)); if (this.lastCategory == column) { if (this.min > number1.doubleValue()) this.min = number1.doubleValue(); if (this.max < number1.doubleValue()) this.max = number1.doubleValue(); if (dataset.getRowCount() - 1 == row) { g2.setPaint(this.groupPaint); g2.setStroke(this.groupStroke); double num2 = rangeAxis.valueToJava2D(this.min, dataArea, plot.getRangeAxisEdge()); double num3 = rangeAxis.valueToJava2D(this.max, dataArea, plot.getRangeAxisEdge()); if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { g2.draw((Shape) new Line2D.Double(categoryMiddle1, num2, categoryMiddle1, num3)); this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num2)); this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num3)); } else { g2.draw((Shape) new Line2D.Double(num2, categoryMiddle1, num3, categoryMiddle1)); this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num2), ByteCodeHelper.d2i(categoryMiddle1)); this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num3), ByteCodeHelper.d2i(categoryMiddle1)); } } } else { this.lastCategory = column; this.min = number1.doubleValue(); this.max = number1.doubleValue(); } if (this.plotLines && column != 0) { Number number2 = dataset.getValue(row, column - 1); if (number2 != null) { double d = number2.doubleValue(); double categoryMiddle2 = domainAxis.getCategoryMiddle(column - 1, this.getColumnCount(), dataArea, plot.getDomainAxisEdge()); double num2 = rangeAxis.valueToJava2D(d, dataArea, plot.getRangeAxisEdge()); g2.setPaint(this.getItemPaint(row, column)); g2.setStroke(this.getItemStroke(row, column)); Line2D.Double double2 = orientation != PlotOrientation.__\u003C\u003EVERTICAL ? new Line2D.Double(num2, categoryMiddle2, num1, categoryMiddle1) : new Line2D.Double(categoryMiddle2, num2, categoryMiddle1, num1); g2.draw((Shape) double2); } } EntityCollection entityCollection = state.getEntityCollection(); if (entityCollection == null || double1 == null) return; this.addItemEntity(entityCollection, dataset, row, column, (Shape) double1); }
bool awt.Shape.contains(geom.Rectangle2D arg_0) { return(Shape.contains(arg_0)); }
protected virtual awt.PaintContext createContextInternal(image.ColorModel cm, awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform, awt.RenderingHints hints) { Matrix.Multiply(xform, _brushTransform.NativeObject, MatrixOrder.Append); return(NativeObject.createContext(cm, deviceBounds, userBounds, xform, hints)); }
bool awt.Shape.intersects(geom.Rectangle2D arg_0) { return(Shape.intersects(arg_0)); }
public virtual void setExplodedPieArea(Rectangle2D area) { this.explodedPieArea = area; }
protected internal override AxisSpace calculateAxisSpace(Graphics2D g2, Rectangle2D plotArea) { AxisSpace space1 = new AxisSpace(); PlotOrientation orientation = this.getOrientation(); AxisSpace fixedDomainAxisSpace = this.getFixedDomainAxisSpace(); if (fixedDomainAxisSpace != null) { if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) { space1.setLeft(fixedDomainAxisSpace.getLeft()); space1.setRight(fixedDomainAxisSpace.getRight()); } else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { space1.setTop(fixedDomainAxisSpace.getTop()); space1.setBottom(fixedDomainAxisSpace.getBottom()); } } else { ValueAxis domainAxis = this.getDomainAxis(); RectangleEdge edge = Plot.resolveDomainAxisLocation(this.getDomainAxisLocation(), orientation); if (domainAxis != null) space1 = domainAxis.reserveSpace(g2, (Plot) this, plotArea, edge, space1); } Rectangle2D rectangle2D = space1.shrink(plotArea, (Rectangle2D) null); int length = this.subplots.size(); int num1 = 0; for (int index = 0; index < length; ++index) { XYPlot xyPlot = (XYPlot) this.subplots.get(index); num1 += xyPlot.getWeight(); } this.subplotAreas = new Rectangle2D[length]; double num2 = ((RectangularShape) rectangle2D).getX(); double num3 = ((RectangularShape) rectangle2D).getY(); double num4 = 0.0; if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) num4 = ((RectangularShape) rectangle2D).getWidth() - this.gap * (double) (length - 1); else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) num4 = ((RectangularShape) rectangle2D).getHeight() - this.gap * (double) (length - 1); for (int index = 0; index < length; ++index) { XYPlot xyPlot = (XYPlot) this.subplots.get(index); if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL) { double num5 = num4 * (double) xyPlot.getWeight() / (double) num1; this.subplotAreas[index] = (Rectangle2D) new Rectangle2D.Double(num2, num3, num5, ((RectangularShape) rectangle2D).getHeight()); num2 = num2 + num5 + this.gap; } else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL) { double num5 = num4 * (double) xyPlot.getWeight() / (double) num1; this.subplotAreas[index] = (Rectangle2D) new Rectangle2D.Double(num2, num3, ((RectangularShape) rectangle2D).getWidth(), num5); num3 = num3 + num5 + this.gap; } AxisSpace space2 = xyPlot.calculateRangeAxisSpace(g2, this.subplotAreas[index], (AxisSpace) null); space1.ensureAtLeast(space2); } return space1; }
public override object draw(Graphics2D g2, Rectangle2D area, object @params) { if (((RectangularShape) area).isEmpty()) return (object) null; area = this.trimMargin(area); this.drawBorder(g2, area); area = this.trimBorder(area); area = this.trimPadding(area); ((Graphics) g2).setFont(this.getFont()); g2.setPaint(this.getPaint()); TextUtilities.drawAlignedString(this.getText(), g2, (float) ((RectangularShape) area).getMinX(), (float) ((RectangularShape) area).getMinY(), TextAnchor.__\u003C\u003ETOP_LEFT); return (object) null; }
public override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info) { if (info != null) info.setPlotArea(area); this.getInsets().trim(area); this.setFixedRangeAxisSpaceForSubplots((AxisSpace) null); AxisSpace space = this.calculateAxisSpace(g2, area); Rectangle2D rectangle2D = space.shrink(area, (Rectangle2D) null); this.setFixedRangeAxisSpaceForSubplots(space); ValueAxis domainAxis = this.getDomainAxis(); RectangleEdge domainAxisEdge = this.getDomainAxisEdge(); double d = RectangleEdge.coordinate(rectangle2D, domainAxisEdge); AxisState axisState = domainAxis.draw(g2, d, area, rectangle2D, domainAxisEdge, info); if (parentState == null) parentState = new PlotState(); parentState.getSharedAxisStates().put((object) domainAxis, (object) axisState); for (int index = 0; index < this.subplots.size(); ++index) { XYPlot xyPlot = (XYPlot) this.subplots.get(index); PlotRenderingInfo info1 = (PlotRenderingInfo) null; if (info != null) { info1 = new PlotRenderingInfo(info.getOwner()); info.addSubplotInfo(info1); } xyPlot.draw(g2, this.subplotAreas[index], anchor, parentState, info1); } if (info == null) return; info.setDataArea(rectangle2D); }