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
text_glyph_pos.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/text_glyph_pos.h"
8
9
#
include
"core/fxcrt/fx_safe_types.h"
10
#
include
"core/fxge/cfx_glyphbitmap.h"
11
12
TextGlyphPos
::
TextGlyphPos
() =
default
;
13
14
TextGlyphPos
::
TextGlyphPos
(
const
TextGlyphPos
&) =
default
;
15
16
TextGlyphPos
::~
TextGlyphPos
() =
default
;
17
18
absl
::
optional
<
CFX_Point
>
TextGlyphPos
::
GetOrigin
(
19
const
CFX_Point& offset)
const
{
20
FX_SAFE_INT32 left = m_Origin.x;
21
left += m_pGlyph->left();
22
left -= offset.x;
23
if
(!left.IsValid())
24
return
absl::nullopt;
25
26
FX_SAFE_INT32 top = m_Origin.y;
27
top -= m_pGlyph->top();
28
top -= offset.y;
29
if
(!top.IsValid())
30
return
absl::nullopt;
31
32
return
CFX_Point(left.ValueOrDie(), top.ValueOrDie());
33
}
TextGlyphPos
Definition
text_glyph_pos.h:17
TextGlyphPos::~TextGlyphPos
~TextGlyphPos()
TextGlyphPos::GetOrigin
absl::optional< CFX_Point > GetOrigin(const CFX_Point &offset) const
Definition
text_glyph_pos.cpp:18
TextGlyphPos::TextGlyphPos
TextGlyphPos(const TextGlyphPos &)
TextGlyphPos::TextGlyphPos
TextGlyphPos()
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
text_glyph_pos.cpp
Generated on Thu Nov 14 2024 00:59:59 for Qt by
1.12.0