#pragma region CPL License /* Nuclex Engine Copyright (C) 2002-2008 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion #include "Nuclex/Text/Font.h" #include using namespace Nuclex::Video; namespace Nuclex { namespace Text { // ------------------------------------------------------------------------------------------- // void Font::drawText( const shared_ptr &spSurface, const wstring &sText, const Point2 &Position, const Color &TextColor, Alignment eAlignment ) { const Surface::LockInfo &LockedSurface = spSurface->lock(Surface::LM_READWRITE); { Loki::ScopeGuard unlock_Surface = Loki::MakeObjGuard(*spSurface.get(), &Surface::unlock); drawText(LockedSurface, sText, Position, TextColor, eAlignment); } } // ------------------------------------------------------------------------------------------- // void Font::copyText( const shared_ptr &spSurface, const wstring &sText, const Point2 &Position, const Color &TextColor, Alignment eAlignment ) { const Surface::LockInfo &LockedSurface = spSurface->lock(Surface::LM_READWRITE); { Loki::ScopeGuard unlock_Surface = Loki::MakeObjGuard(*spSurface.get(), &Surface::unlock); copyText(LockedSurface, sText, Position, TextColor, eAlignment); } } // ------------------------------------------------------------------------------------------- // }} // namespace Nuclex::Text