mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Screen Ruler] Fix measuring of single lines (#20201)
This commit is contained in:
@@ -193,13 +193,6 @@ void DrawMeasureToolTick(const CommonState& commonState,
|
|||||||
const float hMeasure = static_cast<float>(measuredEdges.right - measuredEdges.left + 1);
|
const float hMeasure = static_cast<float>(measuredEdges.right - measuredEdges.left + 1);
|
||||||
const float vMeasure = static_cast<float>(measuredEdges.bottom - measuredEdges.top + 1);
|
const float vMeasure = static_cast<float>(measuredEdges.bottom - measuredEdges.top + 1);
|
||||||
|
|
||||||
// Prevent drawing until we get the first capture
|
|
||||||
const bool hasMeasure = (measuredEdges.right != measuredEdges.left) && (measuredEdges.bottom != measuredEdges.top);
|
|
||||||
if (!hasMeasure)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!continuousCapture && backgroundBitmap)
|
if (!continuousCapture && backgroundBitmap)
|
||||||
{
|
{
|
||||||
d2dState.rt->DrawBitmap(backgroundBitmap.get());
|
d2dState.rt->DrawBitmap(backgroundBitmap.get());
|
||||||
|
|||||||
Reference in New Issue
Block a user