XTDStudios / DMT

Dynamically Mapping Textures
101 stars 13 forks source link

DisplayObjects with smaller than 1 px width or height are not rasterized #13

Closed jarkkosyrjala closed 10 years ago

jarkkosyrjala commented 10 years ago

Because of Rasterizer.as line 289: if (bounds.width>=1 && bounds.height>=1) DisplayObjects with dimensions smaller than 1 px are not rasterized.

Should be if (bounds.width>0 && bounds.height>0) ?

gilamran commented 10 years ago

Why would you want a texture less than 1 pixel... and if you do... you shouldn't use DMT....

jarkkosyrjala commented 10 years ago

When original assets are scaled down for lower resolution device some assets like horizontal lines may potentially be less than 1 px. Missing texture may crash an app.

gilamran commented 10 years ago

ok, sounds reasonable. Did you try this change? I don't want to create bitmaps with height 0... If it works, can you create a pull request?