Xaml image atlas noobie question
I'm just getting started diving into Xaml and Noesis gui, and got to say really liking it so far. I'm running into something that isn't an issue with Noesis, but is causing me some heartache and thought those with experience might know what I am doing wrong.
The problem I am having is that in Blend and in Kaxaml, any Rectangle object using a fill from the image atlas is rendering in the preview as off, how off depends on the texture size used. It renders just fine using Noesis gui through unity though. I'm generating the image atlas using Texture Packer and the Xaml data format found on the Noesis gui github page.
Thoughts?
Also, how do I go about getting this forum account flagged as a Unity license user?
The problem I am having is that in Blend and in Kaxaml, any Rectangle object using a fill from the image atlas is rendering in the preview as off, how off depends on the texture size used. It renders just fine using Noesis gui through unity though. I'm generating the image atlas using Texture Packer and the Xaml data format found on the Noesis gui github page.
Thoughts?
Also, how do I go about getting this forum account flagged as a Unity license user?
Re: Xaml image atlas noobie question
72 dpi at 2048 x 2048, The odd part is, the way it looks (even though it's not correct) is the same in Blend and Kaxaml. Viewing it in Unity though with NoesisGUI and everything looks correct. Not a big deal, but slows down building UIs.
Xaml code is:
Image Resource is:
Xaml code is:
Code: Select all
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Grid.Resources>
<ResourceDictionary Source="ArtTextureAtlas.xaml"/>
</Grid.Resources>
<Rectangle Fill="{StaticResource win_bkgr}" Width="454" Height="697"/>
<Rectangle Fill="{StaticResource AbBar_Main}" Width="742" Height="120" VerticalAlignment="Bottom" />
</Grid>
</Page>
Code: Select all
<!-- Created using Noesis XAML exporter for TexturePacker (http://www.texturepacker.com) -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ImageBrush x:Key="AbBar_Main" ImageSource="ArtTextureAtlasXaml.png" Viewbox="2,2,742,120" ViewboxUnits="Absolute" Stretch="Fill"/>
<ImageBrush x:Key="win_bkgr" ImageSource="ArtTextureAtlasXaml.png" Viewbox="1293,2,454,697" ViewboxUnits="Absolute" Stretch="Fill"/>
...
...
</ResourceDictionary>
Re: Xaml image atlas noobie question
WPF sizes everything by "virtual" pixels, such that 96 virtual pixels fit in one inch (then adjusts actual pixels when rendering). Try either A) removing DPI info from the image (if it is, for example, a PNG), or B) setting it to 96 DPI and see what effect that has.
Re: Xaml image atlas noobie question
I just have to say, I love you for that bit of info...and that has one of the more annoying things I've seen in a framework. Thanks man, switching the image to 96dpi resolved it.
Re: Xaml image atlas noobie question
I have contacted you in private about this.Also, how do I go about getting this forum account flagged as a Unity license user?
Who is online
Users browsing this forum: dengfan and 8 guests