Example #1
0
 private Shape getUpArrow()
 {
   Polygon polygon = new Polygon();
   polygon.addPoint(7, 2);
   polygon.addPoint(2, 7);
   polygon.addPoint(12, 7);
   return (Shape) polygon;
 }
 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);
 }
Example #3
0
 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;
 }