Esempio n. 1
0
 private void finishPathFragment(final WDataSeries series) {
   if (this.pathFragment_.getSegments().isEmpty()) {
     return;
   }
   this.painter_.save();
   this.painter_.setWorldTransform(
       new WTransform(this.currentScale_, 0, 0, this.currentScale_, 0, 0));
   WTransform currentTransform =
       new WTransform(1.0 / this.currentScale_, 0, 0, 1.0 / this.currentScale_, 0, 0)
           .multiply(this.chart_.getZoomRangeTransform());
   this.painter_.setPen(new WPen(PenStyle.NoPen));
   this.painter_.setBrush(new WBrush(BrushStyle.NoBrush));
   this.painter_.setShadow(series.getShadow());
   if (series.getMarker() != MarkerType.CrossMarker
       && series.getMarker() != MarkerType.XCrossMarker
       && series.getMarker() != MarkerType.AsteriskMarker
       && series.getMarker() != MarkerType.StarMarker) {
     this.painter_.setBrush(this.currentBrush_);
     if (!series.getShadow().isNone()) {
       this.painter_.drawStencilAlongPath(
           this.marker_, currentTransform.map(this.pathFragment_), false);
     }
     this.painter_.setShadow(new WShadow());
   }
   this.painter_.setPen(this.currentPen_);
   if (!series.getShadow().isNone()) {
     this.painter_.setBrush(new WBrush(BrushStyle.NoBrush));
   }
   this.painter_.drawStencilAlongPath(
       this.marker_, currentTransform.map(this.pathFragment_), false);
   this.painter_.restore();
   this.pathFragment_.assign(new WPainterPath());
 }
Esempio n. 2
0
 public boolean startSeries(
     final WDataSeries series, double groupWidth, int numBarGroups, int currentBarGroup) {
   this.marker_.assign(new WPainterPath());
   if (series.getMarker() != MarkerType.NoMarker) {
     this.chart_.drawMarker(series, this.marker_);
     this.painter_.save();
     this.needRestore_ = true;
   } else {
     this.needRestore_ = false;
   }
   return true;
 }