| 929 | } |
| 930 | |
| 931 | HRESULT CaptionTextHandler::MyCDWriteText_UpdateOffset(uDWM::CDWriteText* This) |
| 932 | { |
| 933 | if (!g_textGlowSize) |
| 934 | { |
| 935 | return g_CDWriteText_UpdateOffset_Org(This); |
| 936 | } |
| 937 | |
| 938 | // SpriteVisual will crop what exceeds its bounding rectangle, |
| 939 | // here we make it offset x minus the size of the glow, |
| 940 | // and add it back later in the ICompositionSurfaceBrush2::put_Offset method |
| 941 | // |
| 942 | // This gives us enough space to render the glow. |
| 943 | auto& offset = const_cast<POINT&>(This->GetOffset()); |
| 944 | const auto actualOffsetX = offset.x; |
| 945 | if (!This->IsRTLMirrored()) |
| 946 | { |
| 947 | offset.x = std::max(offset.x - g_textGlowSize, 0l); |
| 948 | } |
| 949 | const auto hr = g_CDWriteText_UpdateOffset_Org(This); |
| 950 | offset.x = actualOffsetX; |
| 951 | |
| 952 | return hr; |
| 953 | } |
| 954 | |
| 955 | HRESULT CaptionTextHandler::MyCDWriteText_SetSize(uDWM::CDWriteText* This, const SIZE* size) |
| 956 | { |
nothing calls this directly
no test coverage detected