update some comments
This commit is contained in:
parent
95882f3135
commit
870daa3851
3
Photo.cs
3
Photo.cs
@ -52,8 +52,7 @@ public class Photo {
|
|||||||
// edit the image due to rotation (etc) and don't want to try generating
|
// edit the image due to rotation (etc) and don't want to try generating
|
||||||
// a texture for it until that's already happened.
|
// a texture for it until that's already happened.
|
||||||
LastTouch = touchCounter++;
|
LastTouch = touchCounter++;
|
||||||
// TODO: if we zoom in to more than the display size, actually load the whole image?
|
// FIXME: if we zoom in to more than the display size, actually load the whole image?
|
||||||
// TODO: now cropping is fucky.
|
|
||||||
DecoderOptions options = new DecoderOptions {
|
DecoderOptions options = new DecoderOptions {
|
||||||
TargetSize = new Size(size.X, size.Y),
|
TargetSize = new Size(size.X, size.Y),
|
||||||
SkipMetadata = true
|
SkipMetadata = true
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user