Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 108 - SWFGradient does not work ming 0.4.3 #30

Open
netsweng opened this issue Aug 18, 2013 · 0 comments
Open

Bug 108 - SWFGradient does not work ming 0.4.3 #30

netsweng opened this issue Aug 18, 2013 · 0 comments

Comments

@netsweng
Copy link
Member

webmaster@maxiwebs.co.uk 2011-01-18 10:43:31 EST

SWFGradient does not render properly, draes square half blue half yellow, using
the below code:-

setRate(12.0); $m->setDimension(400,400); $m->setBackground(0xff, 0xff, 0xff); //Width and height of rectangle $sx = 300; $sy = 300; //Create rectangle $s = new SWFShape(); //Gradient file stuff here... $g = new SWFGradient(); $g->addEntry(0.0, 0x00, 0x00, 0xff); // Start off Blue $g->addEntry(1.0, 0xff, 0xff, 0x00); // Finish off Yellow // Add gradient fill to the shape $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); //Centre the gradient fill against the rectangle $f->moveTo($sx/2, $sy/2); //Scale it to the shape, so that the entire gradient fits inside the shape $f->scaleTo($sx/32768, 1); // Set the shapes fill to be the added gradient fill $s->setRightFill($f); //Draw the rectangle $s->drawLine($sx, 0); $s->drawLine(0, $sy); $s->drawLine(-$sx, 0); $s->drawLine(0, -$sy); //Add the shape to the movie $sh = $m->add($s); $sh->moveTo(50, 50); // Output the movie header("Content-type: application/x-shockwave-flash"); $m->output(); ?>

In ming 0.3, it draws a square with a yellow to blue and back to yellow, on
0.4.3 it draws a square half blue and half yellow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant