示例#1
0
 public override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
 {
   Shape clip1 = ((Graphics) g2).getClip();
   ((Graphics) g2).setClip((Shape) area);
   Rectangle2D rectangle2D = this.viewToFrame(area);
   if (this.background != null && this.background.isVisible())
   {
     if (this.background.isClippedToWindow())
     {
       Shape clip2 = ((Graphics) g2).getClip();
       g2.clip(this.dialFrame.getWindow(rectangle2D));
       this.background.draw(g2, this, rectangle2D, area);
       ((Graphics) g2).setClip(clip2);
     }
     else
       this.background.draw(g2, this, rectangle2D, area);
   }
   Iterator iterator1 = this.layers.iterator();
   while (iterator1.hasNext())
   {
     DialLayer dialLayer = (DialLayer) iterator1.next();
     if (dialLayer.isVisible())
     {
       if (dialLayer.isClippedToWindow())
       {
         Shape clip2 = ((Graphics) g2).getClip();
         g2.clip(this.dialFrame.getWindow(rectangle2D));
         dialLayer.draw(g2, this, rectangle2D, area);
         ((Graphics) g2).setClip(clip2);
       }
       else
         dialLayer.draw(g2, this, rectangle2D, area);
     }
   }
   Iterator iterator2 = this.pointers.iterator();
   while (iterator2.hasNext())
   {
     DialPointer dialPointer = (DialPointer) iterator2.next();
     if (dialPointer.isVisible())
     {
       if (dialPointer.isClippedToWindow())
       {
         Shape clip2 = ((Graphics) g2).getClip();
         g2.clip(this.dialFrame.getWindow(rectangle2D));
         dialPointer.draw(g2, this, rectangle2D, area);
         ((Graphics) g2).setClip(clip2);
       }
       else
         dialPointer.draw(g2, this, rectangle2D, area);
     }
   }
   if (this.cap != null && this.cap.isVisible())
   {
     if (this.cap.isClippedToWindow())
     {
       Shape clip2 = ((Graphics) g2).getClip();
       g2.clip(this.dialFrame.getWindow(rectangle2D));
       this.cap.draw(g2, this, rectangle2D, area);
       ((Graphics) g2).setClip(clip2);
     }
     else
       this.cap.draw(g2, this, rectangle2D, area);
   }
   if (this.dialFrame.isVisible())
     this.dialFrame.draw(g2, this, rectangle2D, area);
   ((Graphics) g2).setClip(clip1);
 }