fix: use alpha first
This commit is contained in:
parent
c0604b2959
commit
ba61a98bd5
|
@ -90,13 +90,6 @@ internal class Viewer : IDrawable {
|
||||||
|
|
||||||
var sizeToUse = imageSize;
|
var sizeToUse = imageSize;
|
||||||
if (constrainedX || constrainedY) {
|
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;
|
var dividend = avail / imageSize;
|
||||||
// scale the image based on the more-constrained dimension
|
// scale the image based on the more-constrained dimension
|
||||||
ratio = dividend.Y > dividend.X
|
ratio = dividend.Y > dividend.X
|
||||||
|
@ -114,7 +107,7 @@ internal class Viewer : IDrawable {
|
||||||
var scaledPos = pos * ratio;
|
var scaledPos = pos * ratio;
|
||||||
var posCoord = beforeImage + scaledPos;
|
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);
|
ImGui.GetWindowDrawList().AddCircleFilled(posCoord, 4 * ImGuiHelpers.GlobalScale, 0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue