Files
PowerToys/src/modules/MeasureTool/MeasureToolCore/constants.h
Andrey Nekrasov 9d7c9c1746 [Screen Ruler] Better error handling and reuse D3D device (#20223)
* [Screen Ruler] simplify lines calculation

* [Screen Ruler] Add inches and centimeters support

* [Chore] prefer x64 toolset to avoid hitting C1076

* [Screen Ruler] Allow making screenshots in non-continuous mode

* [Screen Ruler] Use single d3d device for all ops

* [Screen Ruler] remove gpu mutex and clean up screen capturing

* [Screen Ruler] handle and log DXGI initialization failure

* [Screen Ruler] Add unhandled exception handler

* [Screen Ruler] comment out Units of Measure setting

* [Screen Ruler] introduce a separate device dedicated for capturing
2022-09-05 15:39:56 +03:00

22 lines
861 B
C++

#pragma once
#include <chrono>
namespace consts
{
constexpr inline size_t TARGET_FRAME_RATE = 90;
constexpr inline auto TARGET_FRAME_DURATION = std::chrono::microseconds{ 1000000 } / TARGET_FRAME_RATE;
constexpr inline float FONT_SIZE = 14.f;
constexpr inline float TEXT_BOX_CORNER_RADIUS = 4.f;
constexpr inline float FEET_HALF_LENGTH = 2.f;
constexpr inline float SHADOW_OPACITY = .4f;
constexpr inline float SHADOW_RADIUS = 6.f;
constexpr inline float SHADOW_OFFSET = 5.f;
constexpr inline float CROSS_OPACITY = .25f;
constexpr inline int8_t MOUSE_WHEEL_TOLERANCE_STEP = 15;
/* Offset to not try not to use the cursor immediate pixels in measuring, but it seems only necessary for continuous mode. */
constexpr inline long CURSOR_OFFSET_AMOUNT_X = 4;
constexpr inline long CURSOR_OFFSET_AMOUNT_Y = 4;
}