src/share/classes/sun/java2d/SurfaceData.java

Print this page




 560                 // rendering as opposed to outline rendering but the
 561                 // glyph paint rendering pipeline uses MaskBlit which
 562                 // is not defined for XOR.  This means that text drawn
 563                 // in XOR mode with a Color object is different than
 564                 // text drawn in XOR mode with a Paint object.
 565                 sg2d.textpipe = outlineTextRenderer;
 566             } else {
 567                 PixelToShapeConverter converter;
 568                 if (canRenderParallelograms(sg2d)) {
 569                     converter = colorViaPgram;
 570                     // Note that we use the transforming pipe here because it
 571                     // will examine the shape and possibly perform an optimized
 572                     // operation if it can be simplified.  The simplifications
 573                     // will be valid for all STROKE and TRANSFORM types.
 574                     sg2d.shapepipe = colorViaPgram;
 575                 } else {
 576                     converter = colorViaShape;
 577                     sg2d.shapepipe = colorPrimitives;
 578                 }
 579                 if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
 580                     sg2d.drawpipe = converter;
 581                     sg2d.fillpipe = converter;
 582                     // REMIND: We should not be changing text strategies
 583                     // between outline and glyph rendering based upon the
 584                     // presence of a complex clip as that could cause a
 585                     // mismatch when drawing the same text both clipped
 586                     // and unclipped on two separate rendering passes.
 587                     // Unfortunately, all of the clipped glyph rendering
 588                     // pipelines rely on the use of the MaskBlit operation
 589                     // which is not defined for XOR.
 590                     sg2d.textpipe = outlineTextRenderer;
 591                 } else {
 592                     if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
 593                         sg2d.drawpipe = converter;
 594                         sg2d.fillpipe = converter;
 595                     } else {
 596                         if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) {
 597                             sg2d.drawpipe = converter;
 598                         } else {
 599                             sg2d.drawpipe = colorPrimitives;
 600                         }
 601                         sg2d.fillpipe = colorPrimitives;




 560                 // rendering as opposed to outline rendering but the
 561                 // glyph paint rendering pipeline uses MaskBlit which
 562                 // is not defined for XOR.  This means that text drawn
 563                 // in XOR mode with a Color object is different than
 564                 // text drawn in XOR mode with a Paint object.
 565                 sg2d.textpipe = outlineTextRenderer;
 566             } else {
 567                 PixelToShapeConverter converter;
 568                 if (canRenderParallelograms(sg2d)) {
 569                     converter = colorViaPgram;
 570                     // Note that we use the transforming pipe here because it
 571                     // will examine the shape and possibly perform an optimized
 572                     // operation if it can be simplified.  The simplifications
 573                     // will be valid for all STROKE and TRANSFORM types.
 574                     sg2d.shapepipe = colorViaPgram;
 575                 } else {
 576                     converter = colorViaShape;
 577                     sg2d.shapepipe = colorPrimitives;
 578                 }
 579                 if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
 580                     sg2d.drawpipe = paintViaShape;
 581                     sg2d.fillpipe = paintViaShape;
 582                     // REMIND: We should not be changing text strategies
 583                     // between outline and glyph rendering based upon the
 584                     // presence of a complex clip as that could cause a
 585                     // mismatch when drawing the same text both clipped
 586                     // and unclipped on two separate rendering passes.
 587                     // Unfortunately, all of the clipped glyph rendering
 588                     // pipelines rely on the use of the MaskBlit operation
 589                     // which is not defined for XOR.
 590                     sg2d.textpipe = outlineTextRenderer;
 591                 } else {
 592                     if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) {
 593                         sg2d.drawpipe = converter;
 594                         sg2d.fillpipe = converter;
 595                     } else {
 596                         if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) {
 597                             sg2d.drawpipe = converter;
 598                         } else {
 599                             sg2d.drawpipe = colorPrimitives;
 600                         }
 601                         sg2d.fillpipe = colorPrimitives;