|
@ -276,9 +276,6 @@ public static class Util { |
|
|
if (orientation <= 1) { |
|
|
if (orientation <= 1) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
// FIXME: I'm not convinced that all of these are correct, especially the
|
|
|
|
|
|
// cases that involve flipping (because whether you're flipping before or
|
|
|
|
|
|
// after rotation matters.)
|
|
|
|
|
|
var operations = new Dictionary<ushort, (RotateMode, FlipMode)> { |
|
|
var operations = new Dictionary<ushort, (RotateMode, FlipMode)> { |
|
|
{ 2, (RotateMode.None, FlipMode.Horizontal) }, |
|
|
{ 2, (RotateMode.None, FlipMode.Horizontal) }, |
|
|
{ 3, (RotateMode.Rotate180, FlipMode.None) }, |
|
|
{ 3, (RotateMode.Rotate180, FlipMode.None) }, |
|
@ -688,8 +685,6 @@ public class Game : GameWindow { |
|
|
if (earliest != null) { |
|
|
if (earliest != null) { |
|
|
Console.WriteLine($"loadedImages.Count: {loadedImages.Count}, " + |
|
|
Console.WriteLine($"loadedImages.Count: {loadedImages.Count}, " + |
|
|
$"evicting {earliest.Filename} @ {earliestTime}"); |
|
|
$"evicting {earliest.Filename} @ {earliestTime}"); |
|
|
// TODO: we have to free textures on the GL thread, but could we do
|
|
|
|
|
|
// that async'ly to keep the UI responsive?
|
|
|
|
|
|
earliest.Unload(); |
|
|
earliest.Unload(); |
|
|
loadedImages.Remove(earliest); |
|
|
loadedImages.Remove(earliest); |
|
|
} |
|
|
} |
|
@ -770,6 +765,7 @@ public class Game : GameWindow { |
|
|
Texture active = activePhoto.Texture(); |
|
|
Texture active = activePhoto.Texture(); |
|
|
|
|
|
|
|
|
// FIXME: make a function for scaling & centering one box on another.
|
|
|
// FIXME: make a function for scaling & centering one box on another.
|
|
|
|
|
|
// FIXME: cropping is fucky because activeScale is using the texture size, not the photo size.
|
|
|
float scaleX = 1f * geometry.PhotoBox.Size.X / active.Size.X; |
|
|
float scaleX = 1f * geometry.PhotoBox.Size.X / active.Size.X; |
|
|
float scaleY = 1f * geometry.PhotoBox.Size.Y / active.Size.Y; |
|
|
float scaleY = 1f * geometry.PhotoBox.Size.Y / active.Size.Y; |
|
|
float scale = Math.Min(scaleX, scaleY); |
|
|
float scale = Math.Min(scaleX, scaleY); |
|
|