Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
scoped_font_transform.cpp
Go to the documentation of this file.
1// Copyright 2019 The PDFium Authors
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#include "core/fxge/scoped_font_transform.h"
8
9#include <utility>
10
11namespace {
12
13void ResetTransform(FT_Face face) {
14 FT_Matrix matrix;
15 matrix.xx = 0x10000L;
16 matrix.xy = 0;
17 matrix.yx = 0;
18 matrix.yy = 0x10000L;
19 FT_Set_Transform(face, &matrix, nullptr);
20}
21
22} // namespace
23
25 FT_Matrix* matrix)
26 : m_Face(std::move(face)) {
27 FT_Set_Transform(m_Face->GetRec(), matrix, nullptr);
28}
29
31 ResetTransform(m_Face->GetRec());
32}
ScopedFontTransform(RetainPtr< CFX_Face > face, FT_Matrix *matrix)