xref: /aosp_15_r20/external/pdfium/core/fxge/text_char_pos.cpp (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
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/text_char_pos.h"
8 
9 TextCharPos::TextCharPos() = default;
10 
11 TextCharPos::TextCharPos(const TextCharPos&) = default;
12 
13 TextCharPos::~TextCharPos() = default;
14 
GetEffectiveMatrix(const CFX_Matrix & matrix) const15 CFX_Matrix TextCharPos::GetEffectiveMatrix(const CFX_Matrix& matrix) const {
16   CFX_Matrix new_matrix;
17   if (m_bGlyphAdjust) {
18     new_matrix = CFX_Matrix(m_AdjustMatrix[0], m_AdjustMatrix[1],
19                             m_AdjustMatrix[2], m_AdjustMatrix[3], 0, 0);
20   }
21   new_matrix.Concat(matrix);
22   return new_matrix;
23 }
24