263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

Is there any way to draw a border less rectangle without the bottom-right pixel missing. It’s starting to piss me off more than it annoys me. I can’t find a solution!

Any help will be welcomed to solve this mystery!!!

1389 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+7 more
Pdesignx says
drawFreakRect = function(mc, x, y, w, h, color, alpha) {

    mc.beginFill(color, alpha);
    mc.moveTo(x+1,y+0)
    mc.lineTo(x+w-1,y+0);
    mc.lineTo(x+w-1,y+1);
    mc.lineTo(x+w,y+1);
    mc.lineTo(x+w,y+h-1);
    mc.lineTo(x+w-1,y+h-1);
    mc.lineTo(x+w-1,y+h);
    mc.lineTo(x+1,y+h);
    mc.lineTo(x+1,y+h-1);
    mc.lineTo(x+0,y+h-1);
    mc.lineTo(x+0,y+h-2);
    mc.lineTo(x+2,y+h-2);
    mc.lineTo(x+2,y+h-1);
    mc.lineTo(x+w-2,y+h-1);
    mc.lineTo(x+w-2,y+h-2);
    mc.lineTo(x+w-1,y+h-2);
    mc.lineTo(x+w-1,y+2);
    mc.lineTo(x+w-2,y+2);
    mc.lineTo(x+w-2,y+1);
    mc.lineTo(x+2,y+1);
    mc.lineTo(x+2,y+2);
    mc.lineTo(x+1,y+1);
    mc.lineTo(x+1,y+h-2);
    mc.lineTo(x+0,y+h-2);
    mc.lineTo(x+0,y+1);
    mc.lineTo(x+1,y+1);
    mc.lineTo(x+1,y+0);
}
drawFreakRect(_root, 100, 50, 250, 100, 0x000000, 100);
here you go something freak :D

.
by
by
by
by
by
by