From c04039b804f5fb122d1671f681b6bb5ed8eb767c Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 11 Jul 2016 23:16:05 -0700 Subject: [PATCH] Updated Drawing text (markdown) --- Drawing-text.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Drawing-text.md b/Drawing-text.md index 98ea70c..1733a74 100644 --- a/Drawing-text.md +++ b/Drawing-text.md @@ -140,13 +140,13 @@ In **Game.cpp**, modify the TODO section of **Render** to be: const wchar_t* output = L"Hello World"; + Vector2 origin = m_font->MeasureString(output) / 2.f; + m_font->DrawString(m_spriteBatch.get(), output, m_fontPos + Vector2(1.f, 1.f), Colors::Black, 0.f, origin); m_font->DrawString(m_spriteBatch.get(), output, m_fontPos + Vector2(-1.f, 1.f), Colors::Black, 0.f, origin); - Vector2 origin = m_font->MeasureString(output) / 2.f; - m_font->DrawString(m_spriteBatch.get(), output, m_fontPos, Colors::White, 0.f, origin); @@ -164,6 +164,8 @@ In **Game.cpp**, modify the TODO section of **Render** to be: const wchar_t* output = L"Hello World"; + Vector2 origin = m_font->MeasureString(output) / 2.f; + m_font->DrawString(m_spriteBatch.get(), output, m_fontPos + Vector2(1.f, 1.f), Colors::Black, 0.f, origin); m_font->DrawString(m_spriteBatch.get(), output, @@ -173,8 +175,6 @@ In **Game.cpp**, modify the TODO section of **Render** to be: m_font->DrawString(m_spriteBatch.get(), output, m_fontPos + Vector2(1.f, -1.f), Colors::Black, 0.f, origin); - Vector2 origin = m_font->MeasureString(output) / 2.f; - m_font->DrawString(m_spriteBatch.get(), output, m_fontPos, Colors::White, 0.f, origin);