• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXGE_SCOPED_FONT_TRANSFORM_H_
8 #define CORE_FXGE_SCOPED_FONT_TRANSFORM_H_
9 
10 #include "core/fxge/cfx_face.h"
11 #include "core/fxge/fx_freetype.h"
12 
13 // Sets the given transform on the font, and resets it to the identity when it
14 // goes out of scope.
15 class ScopedFontTransform {
16  public:
17   ScopedFontTransform(RetainPtr<CFX_Face> face, FT_Matrix* matrix);
18   ~ScopedFontTransform();
19 
20  private:
21   RetainPtr<CFX_Face> m_Face;
22 };
23 
24 #endif  // CORE_FXGE_SCOPED_FONT_TRANSFORM_H_
25