View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002117||NoesisGUI||C# SDK||public||2021-09-17 16:25||2021-09-30 18:54|
|Target Version||3.1.2||Fixed in Version||3.1.2|
|Summary||0002117: Reloading the texture (via RaiseTextureChanged) which is used in tiled ImageBrush doesn't recalculate the brush tiling|
there is a new bug (since v3.0 or maybe even v3.1.0 as I didn't try it) with texture reloading for ImageBrush.
<ImageBrush x:Key="WidgetBackgroundImageTexture" ImageSource="WidgetBackground.png" TileMode="Tile" Stretch="Uniform" Viewport="0,0,5.5,5.5" ViewportUnits="Absolute" />
See the attached WidgetBackground.png file and screenshots A and B.
Screenshot A: the texture is loaded immediately and RaiseTextureChanged is never called. Proper appearance.
Screenshot B: the texture is not loaded immediately. How it's loaded by our custom TextureProvider (worked fine in v3.0):
- TextureProvider via GetTextureInfo method provides actual texture dimensions
- TextureProvider via LoadTexture method provides null result (as the texture is not yet loaded) and starts loading the texture asynchronously
- once the texture is loaded, RaiseTextureChanged is invoked
After the fix in https://www.noesisengine.com/bugs/view.php?id=2115 RaiseTextureChanged does work but there is this bug with the ImageBrush not being updated.
Besides, I've noticed a difference in how the tiling works in 3.1 compared to 3.0 (for now I'm using instant loading as it doesn't causes any loading bugs). I have to modify all the cases where we're using tiling brushes (at least by modifying Viewport) but the tiling behavior is still visually slightly different compared to what it was before. I see there are no changes in v3.1 release notes regarding this. Is this an expected change? What exactly was changed? I'm really confused regarding this.
|Tags||No tags attached.|
A_Proper.png (1,089,238 bytes)
B_Issue.png (1,093,056 bytes)
|Regarding the ImageBrush tiling. I've noticed that there is no differences when using Viewport+ViewportUnits in 3.0.11 vs 3.1.1 however something has definitely changed regarding the Viewbox and ViewboxUnits properties and how they applied.|
Hi, I'm going to investigate this reloading issue and let you know.
Regarding the tiling, in 3.1 we implemented all Tile modes to properly work in atlas textures. So if you were using a subrect of the source image, it will behave now different from 3.0 version. In 3.1 all tiling modes should look like in WPF.
I found that hot-reloding is not affecting frozen images, we need to think how to solve that properly.
Apart from that, I noticed that you defined the background image as follows:
<ImageBrush x:Key="WidgetBackgroundImageTexture" ImageSource="/UI/Images/Backgrounds/WidgetBackground.png" TileMode="Tile" Stretch="Uniform" Viewport="0,0,8,8" Viewbox="0,0,12,12" ViewboxUnits="Absolute" ViewportUnits="Absolute" />
The Viewbox is bigger than Image size, which is 8x8, so this will leave en empty space between tiles now (according to WPF behavior). This is probably what you are seeing different from 3.0, where viewbox bigger than image was ignored.
thank you for your explanation. Regarding the Viewbox—yes, I was using it this way with the previous NoesisGUI version to get the desired look (for some reason it was the only approach that worked fine). I've removed Viewbox property altogether and fine-tuned Viewport instead—seems good now.
Regarding the frozen images—I hope you can find a useful approach soon. Good luck!
I fixed the reloading issue, please download a patched library here:
|Did you have a chance to try the patched library?|
I'm not sure but the comment was not posted here, perhaps a cookie was outdated (that happens often!) and I didn't check after posting whether it was actually posted.
I've replied on the same date—I've tried the patched library and the issue is resolved. Please close this ticket!
The only blocking issue preventing us from using 3.1 now is https://www.noesisengine.com/bugs/view.php?id=2121
|Thanks, that ticket was the next thing we wanted to resolve.|
|2021-09-17 16:25||ai_enabled||New Issue|
|2021-09-17 16:25||ai_enabled||File Added: WidgetBackground.png|
|2021-09-17 16:25||ai_enabled||File Added: A_Proper.png|
|2021-09-17 16:25||ai_enabled||File Added: B_Issue.png|
|2021-09-17 16:25||ai_enabled||Description Updated|
|2021-09-17 18:39||ai_enabled||Note Added: 0007456|
|2021-09-20 11:03||sfernandez||Assigned To||=> sfernandez|
|2021-09-20 11:03||sfernandez||Status||new => feedback|
|2021-09-20 11:03||sfernandez||Note Added: 0007458|
|2021-09-20 11:03||sfernandez||Note Edited: 0007458|
|2021-09-20 11:03||sfernandez||Target Version||=> 3.1.2|
|2021-09-20 16:33||sfernandez||Note Added: 0007462|
|2021-09-20 16:46||ai_enabled||Note Added: 0007463|
|2021-09-20 16:46||ai_enabled||Status||feedback => assigned|
|2021-09-20 18:24||sfernandez||Status||assigned => feedback|
|2021-09-20 18:24||sfernandez||Note Added: 0007464|
|2021-09-30 18:47||sfernandez||Note Added: 0007493|
|2021-09-30 18:51||ai_enabled||Note Added: 0007494|
|2021-09-30 18:51||ai_enabled||Status||feedback => assigned|
|2021-09-30 18:51||ai_enabled||Note Edited: 0007494|
|2021-09-30 18:54||sfernandez||Status||assigned => resolved|
|2021-09-30 18:54||sfernandez||Resolution||open => fixed|
|2021-09-30 18:54||sfernandez||Fixed in Version||=> 3.1.2|
|2021-09-30 18:54||sfernandez||Note Added: 0007495|