diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-16 21:32:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-16 21:32:26 +0000 |
commit | e80576173df7488964e588f5ac52f9af4b046021 (patch) | |
tree | 6eefe802d130f4ebeea7e6c6f66ee3b49379b92c /xfa/fde/cfde_data.h | |
parent | 027190ec8148a2f1edc18c37eae26e896f3a309a (diff) | |
download | pdfium-e80576173df7488964e588f5ac52f9af4b046021.tar.xz |
Clean up xfa/fde/cfde_textout.h.
- Move enums/structs other than CFDE_TextOut to a separate header.
- Move CFDE_TTOLine into CFDE_TextOut.
Change-Id: I63196ebe6c02bc88d1c20ecb625505013edbfa26
Reviewed-on: https://pdfium-review.googlesource.com/22930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fde/cfde_data.h')
-rw-r--r-- | xfa/fde/cfde_data.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/xfa/fde/cfde_data.h b/xfa/fde/cfde_data.h new file mode 100644 index 0000000000..d4ca63d071 --- /dev/null +++ b/xfa/fde/cfde_data.h @@ -0,0 +1,46 @@ +// Copyright 2018 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef XFA_FDE_CFDE_DATA_H_ +#define XFA_FDE_CFDE_DATA_H_ + +#include "core/fxcrt/fx_coordinates.h" + +enum class FDE_TextAlignment : uint8_t { + kTopLeft = 0, + kCenterLeft, + kCenter, + kCenterRight +}; + +struct FDE_TextStyle { + FDE_TextStyle() + : single_line_(false), line_wrap_(false), last_line_height_(false) {} + ~FDE_TextStyle() {} + + void Reset() { + single_line_ = false; + line_wrap_ = false; + last_line_height_ = false; + } + + bool single_line_; + bool line_wrap_; + bool last_line_height_; +}; + +struct FDE_TTOPIECE { + FDE_TTOPIECE(); + FDE_TTOPIECE(const FDE_TTOPIECE& that); + ~FDE_TTOPIECE(); + + int32_t iStartChar; + int32_t iChars; + uint32_t dwCharStyles; + CFX_RectF rtPiece; +}; + +#endif // XFA_FDE_CFDE_DATA_H_ |