# Pixel line with drawRect resize issue

**URL:** <https://forum.kirupa.com/t/pixel-line-with-drawrect-resize-issue/261306>\
**Category:** Uncategorized\
**Created:** [May 26, 2008, 5:54am UTC](https://forum.kirupa.com/t/pixel-line-with-drawrect-resize-issue/261306 "2008-05-26T05:54:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iscarrr](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@iscarrr](https://forum.kirupa.com/u/iscarrr)\
**Post date:** [May 26, 2008, 5:54am UTC](https://forum.kirupa.com/t/pixel-line-with-drawrect-resize-issue/261306/1 "2008-05-26T05:54:40Z")

</div>

Hi all,

Im basically doing some line art using drawRect, just to draw various 1px lines, whether it be 1px high and 100% wide or 1px wide and 100% high.

The complete flash movie is resizable (a requirement). At the moment as you’ll see in my pic attached, not all lines are being rendered the same. Now i know because im making the movie scale, the lines cannot remain at 1px, but what i dont understand is why some go to 2px while some are still 1px, then resize it, most go to 3px but some are 4px?

Like i said im drawing them with drawRect:

```php

            var line4 = new Sprite();
            line4.graphics.beginFill(0x000000);
            line4.graphics.drawRect(introPanel.width/4, 636, 1, 636/2);
            line4.graphics.endFill();

```

Is there a better was to draw them? or is there some setting to not smooth them into a blured 2px instead of one?

![](http://img181.imageshack.us/img181/1585/pixelissuefq2.gif)

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [May 26, 2008, 11:08am UTC](https://forum.kirupa.com/t/pixel-line-with-drawrect-resize-issue/261306/2 "2008-05-26T11:08:34Z")

</div>

That can be rounding problem while drawing those rects.  
Maybe just draw a single line or all rects without left side
