VOID BackgroundObject::DrawOverlay(WCHAR *wChar, UINT length)
{
D2D1_SIZE_F renderTargetSize = m_pRenderTarget->GetSize();
m_pRenderTarget->SetTransform(Matrix3x2F::Identity());
m_pRenderTarget->DrawText(wChar,
length - 1,
m_pD2DDriver->GetTextFormat(),
RectF(g_metrics.UnscaleX(10), 0, renderTargetSize.width, renderTargetSize.height),
m_pD2DDriver->GetBrush(DrawingColor::White));
}
上面的代码是将字体绘制到窗口上,但我想更改字体的大小。我该怎么做?
无论如何,我对 MSDN 还是很陌生...非常感谢任何帮助!