ChavezArquitectos / curvycorners

Automatically exported from code.google.com/p/curvycorners
0 stars 0 forks source link

Black corners on IE8 repeated trasparent png divs when curved #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Using curvycorners 2.0.4 - 2.0.5pre12 on divs containing repeated
transparent .png background images.

Css Example: 

        #abox2_shadow-container .abox2_shadow1,
    #abox2_shadow-container .abox2_shadow2,
    #abox2_shadow-container .abox2_shadow3 {
        background: url('../images/sfx_abox2/7black.png') repeat;
    }

What is the expected output? What do you see instead?

The expected output is a curved transparent corner on IE 8. What is output
is a curved corner but the corner's edge is solid black. This seems to be
an issue with the trasparent edge being anti aliased with solid colors.

What version of the product are you using? On what operating system?

Both curvycorners 2.0.4 and SVN 2.0.5pre12 are affected in IE8 on Windows
XP 32bit version. I haven't tested for similar rendering issues on Vista
and with IE 7 but I would expect similar  erroneous behavior.

Please provide any additional information below.

I am more of a PHP programmer, so check my code but I seem to have solved
the problem by changing the code on the following line as described below:

on line 726 change:

if (this.spec.antiAlias) {
          // Cycle the y-axis and draw the anti aliased pixels on the
outside of the curve
          while (++inty < y4) {
            // For each of the pixels that need anti aliasing between the
foreground/border colour & background draw single pixel divs
            this.drawPixel(intx, inty, outsideColour,
(curvyObject.pixelFraction(intx, inty , specRadius) * trans), 1, newCorner,
borderWidthTB <= 0, specRadius);
          }
        }

To:

// Draw aa pixels?
        if (this.spec.antiAlias && this.boxColour !== 'transparent') {
          // Cycle the y-axis and draw the anti aliased pixels on the
outside of the curve
          while (++inty < y4) {
            // For each of the pixels that need anti aliasing between the
foreground/border colour & background draw single pixel divs
            this.drawPixel(intx, inty, outsideColour,
(curvyObject.pixelFraction(intx, inty , specRadius) * trans), 1, newCorner,
borderWidthTB <= 0, specRadius);
          }
        }

Original issue reported on code.google.com by xilo...@gmail.com on 21 Aug 2009 at 10:34

GoogleCodeExporter commented 8 years ago
Thanks for this report. I understand the temptation to "code around" specific 
problems but am reluctant to do so in case this will obscure the right 
solution. In 
this case, I believe the problem lies in the pixelFraction function or one of 
its 
subroutines, and that it causes other problems in other situations.

I shall be tackling it as my highest priority now in this project.

Original comment by c.1%smit...@gtempaccount.com on 26 Aug 2009 at 1:00

GoogleCodeExporter commented 8 years ago
I completely agree that one shouldn't code around issues. I wasn't suggesting 
you
treat my code as a final solution just that my code solved the issue with 
regards to
how I was using curvycorners while pointing out that the issue had something to 
do
with curvycorner's anti aliasing functionality with regards to transparent .png 
images.

Anyway, thanks for you response and taking on the issue. I truly think 
curvycorners
is magic and it's developers are nothing short of the most generous wizards for
creating it.

Original comment by xilo...@gmail.com on 26 Aug 2009 at 6:55

GoogleCodeExporter commented 8 years ago
do you test that on safari?

Original comment by sou...@gmail.com on 16 Oct 2009 at 6:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yes, it was tested and working fine on Safari. Just FYI though there where no 
issues
to code around on Safari as webkit has native support for border-radius through
-webkit-border-radius meaning curvy corners doesn't come into play.

Original comment by xilo...@gmail.com on 16 Oct 2009 at 8:33

GoogleCodeExporter commented 8 years ago
Well, #2, I'm sorry it has taken this long. But having looked into the matter, 
I think 
the most efficient solution is to do just as you originally suggested. Thank 
you for 
your help and your fix, now incorporated in r156.

Original comment by c.1%smit...@gtempaccount.com on 21 Mar 2010 at 3:55