1 Reply Latest reply on Sep 4, 2012 8:52 AM by ChristianKiefer

    Using opaqueBackground results in ugly borders

    ChristianKiefer Level 1


      I am using


      cacheAsBitmap = true;

      opaqueBackground = 0xFF0000;


      in an itemRenderer


      and I am overriding drawBackground() and drawing inside....


      var matrix:Matrix = new Matrix();

                                    matrix.createGradientBox(getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight(), Math.PI/2, 0, 1);

                                    graphics.beginGradientFill(GradientType.LINEAR, [startColor, middleColor, endColor], [1, 1, 1], [0, 191, 255], matrix);

                                    graphics.drawRect(0, 0, getExplicitOrMeasuredWidth(), getExplicitOrMeasuredHeight());




      Everything is fine but I have a 1px "boder" in red from the opaque background on the top and on the right...


      Anyone an idea why this happens?