< prev index next >

src/java.desktop/share/classes/sun/java2d/pipe/PixelToParallelogramConverter.java

Print this page




  39  * Most calls are transformed into calls to the fill(Shape) method
  40  * by the parent PixelToShapeConverter class, but some calls are
  41  * transformed into calls to fill/drawParallelogram().
  42  */
  43 public class PixelToParallelogramConverter extends PixelToShapeConverter
  44     implements ShapeDrawPipe
  45 {
  46     ParallelogramPipe outrenderer;
  47     double minPenSize;
  48     double normPosition;
  49     double normRoundingBias;
  50     boolean adjustfill;
  51 
  52     /**
  53      * @param shapepipe pipeline to forward shape calls to
  54      * @param pgrampipe pipeline to forward parallelogram calls to
  55      *                  (and drawLine calls if possible)
  56      * @param minPenSize minimum pen size for dropout control
  57      * @param normPosition sub-pixel location to normalize endpoints
  58      *                     for STROKE_NORMALIZE cases
  59      * @param adjustFill boolean to control whethere normalization
  60      *                   constants are also applied to fill operations
  61      *                   (normally true for non-AA, false for AA)
  62      */
  63     public PixelToParallelogramConverter(ShapeDrawPipe shapepipe,
  64                                          ParallelogramPipe pgrampipe,
  65                                          double minPenSize,
  66                                          double normPosition,
  67                                          boolean adjustfill)
  68     {
  69         super(shapepipe);
  70         outrenderer = pgrampipe;
  71         this.minPenSize = minPenSize;
  72         this.normPosition = normPosition;
  73         this.normRoundingBias = 0.5 - normPosition;
  74         this.adjustfill = adjustfill;
  75     }
  76 
  77     public void drawLine(SunGraphics2D sg2d,
  78                          int x1, int y1, int x2, int y2)
  79     {




  39  * Most calls are transformed into calls to the fill(Shape) method
  40  * by the parent PixelToShapeConverter class, but some calls are
  41  * transformed into calls to fill/drawParallelogram().
  42  */
  43 public class PixelToParallelogramConverter extends PixelToShapeConverter
  44     implements ShapeDrawPipe
  45 {
  46     ParallelogramPipe outrenderer;
  47     double minPenSize;
  48     double normPosition;
  49     double normRoundingBias;
  50     boolean adjustfill;
  51 
  52     /**
  53      * @param shapepipe pipeline to forward shape calls to
  54      * @param pgrampipe pipeline to forward parallelogram calls to
  55      *                  (and drawLine calls if possible)
  56      * @param minPenSize minimum pen size for dropout control
  57      * @param normPosition sub-pixel location to normalize endpoints
  58      *                     for STROKE_NORMALIZE cases
  59      * @param adjustfill boolean to control whethere normalization
  60      *                   constants are also applied to fill operations
  61      *                   (normally true for non-AA, false for AA)
  62      */
  63     public PixelToParallelogramConverter(ShapeDrawPipe shapepipe,
  64                                          ParallelogramPipe pgrampipe,
  65                                          double minPenSize,
  66                                          double normPosition,
  67                                          boolean adjustfill)
  68     {
  69         super(shapepipe);
  70         outrenderer = pgrampipe;
  71         this.minPenSize = minPenSize;
  72         this.normPosition = normPosition;
  73         this.normRoundingBias = 0.5 - normPosition;
  74         this.adjustfill = adjustfill;
  75     }
  76 
  77     public void drawLine(SunGraphics2D sg2d,
  78                          int x1, int y1, int x2, int y2)
  79     {


< prev index next >