private Shape getUpArrow() { Polygon polygon = new Polygon(); polygon.addPoint(7, 2); polygon.addPoint(2, 7); polygon.addPoint(12, 7); return (Shape) polygon; }
public XYStepAreaRenderer(int type, XYToolTipGenerator toolTipGenerator, XYURLGenerator urlGenerator) { XYStepAreaRenderer stepAreaRenderer = this; this.pArea = (Polygon) null; this.setBaseToolTipGenerator(toolTipGenerator); this.setURLGenerator(urlGenerator); if (type == 2) this.plotArea = true; else if (type == 1) this.shapesVisible = true; else if (type == 3) { this.plotArea = true; this.shapesVisible = true; } this.showOutline = false; }
/// <summary> /// Draws the outline of a polygon defined by the specified /// <code>Polygon</code> object. /// </summary> public void drawPolygon(Polygon @p) { }
/// <summary> /// Fills the polygon defined by the specified Polygon object with /// the graphics context's current color. /// </summary> public void fillPolygon(Polygon @p) { }
public virtual void drawSeries(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, PolarPlot plot, XYDataset dataset, int seriesIndex) { Polygon polygon = new Polygon(); int itemCount = dataset.getItemCount(seriesIndex); for (int i2 = 0; i2 < itemCount; ++i2) { double xvalue = dataset.getXValue(seriesIndex, i2); double yvalue = dataset.getYValue(seriesIndex, i2); Point point = plot.translateValueThetaRadiusToJava2D(xvalue, yvalue, dataArea); polygon.addPoint((int) point.x, (int) point.y); } g2.setPaint(this.lookupSeriesPaint(seriesIndex)); g2.setStroke(this.lookupSeriesStroke(seriesIndex)); if (this.isSeriesFilled(seriesIndex)) { Composite composite = g2.getComposite(); g2.setComposite((Composite) AlphaComposite.getInstance(3, 0.5f)); g2.fill((Shape) polygon); g2.setComposite(composite); } else g2.draw((Shape) polygon); }
protected internal ValueAxis(string label, TickUnitSource standardTickUnits) : base(label) { ValueAxis valueAxis = this; this.positiveArrowVisible = false; this.negativeArrowVisible = false; this.range = ValueAxis.__\u003C\u003EDEFAULT_RANGE; this.autoRange = true; this.defaultAutoRange = ValueAxis.__\u003C\u003EDEFAULT_RANGE; this.inverted = false; this.autoRangeMinimumSize = 1E-08; this.lowerMargin = 0.05; this.upperMargin = 0.05; this.fixedAutoRange = 0.0; this.autoTickUnitSelection = true; this.standardTickUnits = standardTickUnits; Polygon polygon1 = new Polygon(); polygon1.addPoint(0, 0); polygon1.addPoint(-2, 2); polygon1.addPoint(2, 2); this.upArrow = (Shape) polygon1; Polygon polygon2 = new Polygon(); polygon2.addPoint(0, 0); polygon2.addPoint(-2, -2); polygon2.addPoint(2, -2); this.downArrow = (Shape) polygon2; Polygon polygon3 = new Polygon(); polygon3.addPoint(0, 0); polygon3.addPoint(-2, -2); polygon3.addPoint(-2, 2); this.rightArrow = (Shape) polygon3; Polygon polygon4 = new Polygon(); polygon4.addPoint(0, 0); polygon4.addPoint(2, -2); polygon4.addPoint(2, 2); this.leftArrow = (Shape) polygon4; this.verticalTickLabels = false; this.minorTickCount = 0; }
public static bool equal(Polygon p1, Polygon p2) { if (p1 == null) return p2 == null; else return p2 != null && p1.npoints == p2.npoints && (Arrays.equals((int[]) p1.xpoints, (int[]) p2.xpoints) && Arrays.equals((int[]) p1.ypoints, (int[]) p2.ypoints)); }