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
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Grew a moustache for the Envato Movember competition
- Has been a member for 4-5 years
- Item was Featured
- Microlancer Beta Tester
- Referred between 10 and 49 users
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
.
