src/share/classes/sun/java2d/pipe/SpanShapeRenderer.java

Print this page




  57         }
  58 
  59         public void renderBox(Object ctx, int x, int y, int w, int h) {
  60             comppipe.renderPathTile(ctx, null, 0, w, x, y, w, h);
  61         }
  62 
  63         public void endSequence(Object ctx) {
  64             comppipe.endSequence(ctx);
  65         }
  66     }
  67 
  68     public static class Simple extends SpanShapeRenderer {
  69         public Object startSequence(SunGraphics2D sg, Shape s,
  70                                     Rectangle devR, int[] bbox) {
  71             return sg;
  72         }
  73 
  74         public void renderBox(Object ctx, int x, int y, int w, int h) {
  75             SunGraphics2D sg2d = (SunGraphics2D) ctx;
  76             SurfaceData sd = sg2d.getSurfaceData();
  77             sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
  78         }
  79 
  80         public void endSequence(Object ctx) {
  81         }
  82     }
  83 
  84     public void draw(SunGraphics2D sg, Shape s) {
  85         if (sg.stroke instanceof BasicStroke) {
  86             ShapeSpanIterator sr = LoopPipe.getStrokeSpans(sg, s);
  87             try {
  88                 renderSpans(sg, sg.getCompClip(), s, sr);
  89             } finally {
  90                 sr.dispose();
  91             }
  92         } else {
  93             fill(sg, sg.stroke.createStrokedShape(s));
  94         }
  95     }
  96 
  97     public static final int NON_RECTILINEAR_TRANSFORM_MASK =




  57         }
  58 
  59         public void renderBox(Object ctx, int x, int y, int w, int h) {
  60             comppipe.renderPathTile(ctx, null, 0, w, x, y, w, h);
  61         }
  62 
  63         public void endSequence(Object ctx) {
  64             comppipe.endSequence(ctx);
  65         }
  66     }
  67 
  68     public static class Simple extends SpanShapeRenderer {
  69         public Object startSequence(SunGraphics2D sg, Shape s,
  70                                     Rectangle devR, int[] bbox) {
  71             return sg;
  72         }
  73 
  74         public void renderBox(Object ctx, int x, int y, int w, int h) {
  75             SunGraphics2D sg2d = (SunGraphics2D) ctx;
  76             SurfaceData sd = sg2d.getSurfaceData();
  77             sg2d.getLoops().fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
  78         }
  79 
  80         public void endSequence(Object ctx) {
  81         }
  82     }
  83 
  84     public void draw(SunGraphics2D sg, Shape s) {
  85         if (sg.stroke instanceof BasicStroke) {
  86             ShapeSpanIterator sr = LoopPipe.getStrokeSpans(sg, s);
  87             try {
  88                 renderSpans(sg, sg.getCompClip(), s, sr);
  89             } finally {
  90                 sr.dispose();
  91             }
  92         } else {
  93             fill(sg, sg.stroke.createStrokedShape(s));
  94         }
  95     }
  96 
  97     public static final int NON_RECTILINEAR_TRANSFORM_MASK =