JohnnyOpcode / degrafa

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

RoundedRectangleComplex incorrect when all radii are 0 #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

When RoundedRectangleComplex has all corner radii set to 0, the resulting
rectangle is incorrect.  It can be fixed with the following change which
adds x or y to the height and width of the commands.

override public function preDraw():void{
if(invalidated){
    commandStack = [];
    if(topLeftRadius==0 && topRightRadius==0 && bottomLeftRadius==0 &&
bottomRightRadius==0){
    commandStack.push({type:"m", x:x,y:y}); 
    commandStack.push({type:"l", x:width+x,y:y}); // <- Bug fix 
    commandStack.push({type:"l", x:width+x,y:height+y}); // <- Bug fix
    commandStack.push({type:"l", x:x,y:height+y});  // <- Bug fix
    commandStack.push({type:"l", x:x,y:y}); 
        }               

Original issue reported on code.google.com by marc.hug...@gmail.com on 2 Oct 2008 at 3:23

GoogleCodeExporter commented 8 years ago
I just checked our development codebase in preparation for beta3 release. beta3
already includes this fix (internal commandStack implementation is different in
beta3). Release of a new beta3 swc is 'very soon' and should function as 
expected.
Thanks for your report.

Original comment by greg.d...@gmail.com on 14 Oct 2008 at 10:08