fix: use alpha first

This commit is contained in:
Anna 2024-02-22 00:34:59 -05:00
parent c0604b2959
commit ba61a98bd5
Signed by: anna
GPG Key ID: D0943384CD9F87D1
1 changed files with 1 additions and 8 deletions

View File

@ -90,13 +90,6 @@ internal class Viewer : IDrawable {
var sizeToUse = imageSize;
if (constrainedX || constrainedY) {
// var dividend = imageSize / avail;
// var inv = Vector2.One / dividend;
// scale the image based on the more-constrained dimension
// var ratio = dividend.X > dividend.Y
// ? inv.X // X is more constrained
// : inv.Y; // Y is more constrained
var dividend = avail / imageSize;
// scale the image based on the more-constrained dimension
ratio = dividend.Y > dividend.X
@ -114,7 +107,7 @@ internal class Viewer : IDrawable {
var scaledPos = pos * ratio;
var posCoord = beforeImage + scaledPos;
ImGui.GetWindowDrawList().AddCircleFilled(posCoord, 6 * ImGuiHelpers.GlobalScale, 0x000000FF);
ImGui.GetWindowDrawList().AddCircleFilled(posCoord, 6 * ImGuiHelpers.GlobalScale, 0xFF000000);
ImGui.GetWindowDrawList().AddCircleFilled(posCoord, 4 * ImGuiHelpers.GlobalScale, 0xFFFFFFFF);
}