haxeui / haxeui-nme

The NME backend of the HaxeUI framework -
http://haxeui.org
MIT License
4 stars 6 forks source link

Width of component blocks graphics drawing #2

Closed hoseyjoe closed 4 years ago

hoseyjoe commented 8 years ago

I was trying to use the nme drawing (Sprite.graphics) and it appeared to work with some issue.

Expected Behavior

component.graphics.drawRect(0,0,200,200) should draw a 200x200 pixel square

Current Behavior

a little bit is shown

Possible Solution

I added width and height and nothing showed. However just adding height allowed the box to be shown.

Steps to Reproduce (for bugs)

Where mainConent is a ScrollView var s:Component = new Component(); // s.width = 200; // s.height = 200; s.graphics.beginFill(0); s.graphics.drawRect(0, 0, 200, 200); s.graphics.endFill(); s.includeInLayout = true; mainContent.addComponent(s);

  1. this should display a little
  2. Uncomment s.height and the component will display
  3. uncomment s.width and s.height and nothing appears
    • I needed to explicitly add s.width and s.height for the ScrollView to display scrollbars when appropriate (instead of 200x200 try 1000x1000)

      Your Environment

windows

hoseyjoe commented 4 years ago

cant repeat