mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[Screen Ruler] optimize d3d device & continuous capture mode (#20198)
* [Screen Ruler] Exclude overlay window from capture * [Screen ruler] Sync OverlayUI threads creation and don't recreate d3d device
This commit is contained in:
@@ -217,7 +217,7 @@ void DrawMeasureToolTick(const CommonState& commonState,
|
||||
D2D_POINT_2F hLineEnd{ .x = hLineStart.x + hMeasure, .y = hLineStart.y };
|
||||
d2dState.rt->DrawLine(hLineStart, hLineEnd, d2dState.solidBrushes[Brush::line].get());
|
||||
|
||||
if (drawFeetOnCross && !continuousCapture)
|
||||
if (drawFeetOnCross)
|
||||
{
|
||||
// To fill all pixels which are close, we call DrawLine with end point one pixel too far, since
|
||||
// it doesn't get filled, i.e. end point of the range is excluded. However, we want to draw cross
|
||||
@@ -236,7 +236,7 @@ void DrawMeasureToolTick(const CommonState& commonState,
|
||||
D2D_POINT_2F vLineEnd{ .x = vLineStart.x, .y = vLineStart.y + vMeasure };
|
||||
d2dState.rt->DrawLine(vLineStart, vLineEnd, d2dState.solidBrushes[Brush::line].get());
|
||||
|
||||
if (drawFeetOnCross && !continuousCapture)
|
||||
if (drawFeetOnCross)
|
||||
{
|
||||
vLineEnd.y -= 1.f;
|
||||
auto [top_start, top_end] = ComputeCrossFeetLine(vLineStart, true);
|
||||
|
||||
Reference in New Issue
Block a user