1
0
mirror of https://github.com/fadden/6502bench.git synced 2026-04-26 12:18:26 +00:00

More progress on animated visualizations

Bitmap animations are composed of a sequence of other visualizations.
This is all well and good until a visualization is deleted, at which
point all animations in all sets in the entire project have to be
checked and potentially changed, and perhaps even removed (if all of
the animation's members have been removed).  This turns out to be
kind of annoying to deal with, but it's better to deal with it in
code than force the user to manually update broken animations.

This change adds thumbnails for the animations, currently generated
by offscreen composition.  This approach doesn't work quite right.
This commit is contained in:
Andy McFadden
2019-12-21 18:04:44 -08:00
parent fef7668b63
commit 12293d3cf8
9 changed files with 307 additions and 13 deletions
+12
View File
@@ -72,12 +72,24 @@ namespace SourceGen {
/// </remarks>
public BitmapSource CachedImage { get; set; }
/// <summary>
/// True if CachedImage has something other than the default value.
/// </summary>
public bool HasImage {
get {
return CachedImage != BROKEN_IMAGE && CachedImage != ANIM_IMAGE;
}
}
/// <summary>
/// Image to show when things are broken.
/// </summary>
public static readonly BitmapImage BROKEN_IMAGE =
new BitmapImage(new Uri("pack://application:,,,/Res/RedX.png"));
internal static readonly BitmapImage ANIM_IMAGE =
new BitmapImage(new Uri("pack://application:,,,/Res/BlueChevron.png"));
/// <summary>
/// Serial number, for reference from other Visualization objects. Not serialized.
/// </summary>