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

.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by