mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Make bottom overhanging characters visible with D2D
This commit is contained in:
parent
b8333dc66d
commit
027feabf86
@ -332,12 +332,16 @@ void CanvasD2D::DrawTextW(const WCHAR* str, UINT strLen, const TextFormat& forma
|
||||
return rect.X;
|
||||
} ();
|
||||
|
||||
DWRITE_OVERHANG_METRICS overhangMetrics;
|
||||
formatD2D.m_TextLayout->GetOverhangMetrics(&overhangMetrics);
|
||||
|
||||
D2D1::Matrix3x2F transformMatrix;
|
||||
m_Target->GetTransform(&transformMatrix);
|
||||
const bool identityTransform = transformMatrix.IsIdentity();
|
||||
|
||||
// TODO: Determine if we can avoid clipping.
|
||||
D2D1_RECT_F clipRect = ToRectF(rect);
|
||||
clipRect.bottom += ceil(overhangMetrics.bottom);
|
||||
if (identityTransform)
|
||||
{
|
||||
m_Target->PushAxisAlignedClip(clipRect, D2D1_ANTIALIAS_MODE_ALIASED);
|
||||
|
Loading…
Reference in New Issue
Block a user