MCPcopy Create free account
hub / github.com/ALTaleX531/OpenGlass / MyCChannel_MatrixTransformUpdate

Method MyCChannel_MatrixTransformUpdate

OpenGlass/CaptionTextHandler.cpp:470–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 return g_CText_scalar_deleting_destructor_Org(This, flag);
469}
470HRESULT CaptionTextHandler::MyCChannel_MatrixTransformUpdate(dwmcore::CChannel* This, UINT handleId, MilMatrix3x2D* matrix)
471{
472 if (g_textVisual)
473 {
474 matrix->DX -= static_cast<DOUBLE>(g_textGlowSize);
475 matrix->DY -= static_cast<DOUBLE>(g_textGlowSize);
476
477 // Apply the same CenterCaption offset to the legacy text transform.
478 const DOUBLE offset = static_cast<DOUBLE>(CaptionCenterOffset(
479 static_cast<DOUBLE>(g_textVisual->GetWidth()),
480 static_cast<DOUBLE>(g_textSize.cx),
481 static_cast<DOUBLE>(g_textVisual->GetX()),
482 static_cast<DOUBLE>(g_textVisual->GetTransformParent()->GetWidth()),
483 g_textVisual->GetScale().width
484 ));
485 if (offset > 0.0)
486 {
487 matrix->DX += g_textVisual->IsRTLMirrored() ? -offset : offset;
488 }
489 }
490
491 return g_CChannel_MatrixTransformUpdate_Org(This, handleId, matrix);
492}
493
494void CaptionTextHandler::MyID2D1DeviceContext_DrawTextLayout(
495 ID2D1DeviceContext* This,

Callers

nothing calls this directly

Calls 6

CaptionCenterOffsetFunction · 0.85
GetWidthMethod · 0.80
GetXMethod · 0.80
GetTransformParentMethod · 0.80
GetScaleMethod · 0.80
IsRTLMirroredMethod · 0.45

Tested by

no test coverage detected