Flutter Impeller
paragraph.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter 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 #ifndef FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_H_
7 
8 #include "flutter/third_party/txt/src/txt/paragraph.h"
11 
12 namespace impeller::interop {
13 
14 class Paragraph final
15  : public Object<Paragraph,
16  IMPELLER_INTERNAL_HANDLE_NAME(ImpellerParagraph)> {
17  public:
18  explicit Paragraph(std::unique_ptr<txt::Paragraph> paragraph);
19 
20  ~Paragraph() override;
21 
22  Paragraph(const Paragraph&) = delete;
23 
24  Paragraph& operator=(const Paragraph&) = delete;
25 
26  Scalar GetMaxWidth() const;
27 
28  Scalar GetHeight() const;
29 
31 
33 
35 
37 
39 
40  uint32_t GetLineCount() const;
41 
42  const std::unique_ptr<txt::Paragraph>& GetHandle() const;
43 
44  private:
45  std::unique_ptr<txt::Paragraph> paragraph_;
46 };
47 
48 } // namespace impeller::interop
49 
50 #endif // FLUTTER_IMPELLER_TOOLKIT_INTEROP_PARAGRAPH_H_
impeller.h
impeller::interop::Paragraph::~Paragraph
~Paragraph() override
impeller::interop::Paragraph::operator=
Paragraph & operator=(const Paragraph &)=delete
impeller::interop::Object
Definition: object.h:56
impeller::Scalar
float Scalar
Definition: scalar.h:18
impeller::interop::Paragraph::GetLongestLineWidth
Scalar GetLongestLineWidth() const
Definition: paragraph.cc:22
impeller::interop::Paragraph::GetMinIntrinsicWidth
Scalar GetMinIntrinsicWidth() const
Definition: paragraph.cc:26
impeller::interop::Paragraph::Paragraph
Paragraph(std::unique_ptr< txt::Paragraph > paragraph)
Definition: paragraph.cc:9
impeller::interop
Definition: color_filter.cc:7
impeller::interop::Paragraph::GetHandle
const std::unique_ptr< txt::Paragraph > & GetHandle() const
Definition: paragraph.cc:46
impeller::interop::Paragraph::GetHeight
Scalar GetHeight() const
Definition: paragraph.cc:18
impeller::interop::Paragraph::GetMaxWidth
Scalar GetMaxWidth() const
Definition: paragraph.cc:14
impeller::interop::Paragraph::GetIdeographicBaseline
Scalar GetIdeographicBaseline() const
Definition: paragraph.cc:34
impeller::interop::Paragraph
Definition: paragraph.h:14
impeller::interop::Paragraph::GetMaxIntrinsicWidth
Scalar GetMaxIntrinsicWidth() const
Definition: paragraph.cc:30
impeller::interop::Paragraph::GetAlphabeticBaseline
Scalar GetAlphabeticBaseline() const
Definition: paragraph.cc:38
object.h
impeller::interop::Paragraph::GetLineCount
uint32_t GetLineCount() const
Definition: paragraph.cc:42