Flutter Impeller
paragraph.cc
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 
6 
7 namespace impeller::interop {
8 
9 Paragraph::Paragraph(std::unique_ptr<txt::Paragraph> paragraph)
10  : paragraph_(std::move(paragraph)) {}
11 
12 Paragraph::~Paragraph() = default;
13 
15  return paragraph_->GetMaxWidth();
16 }
17 
19  return paragraph_->GetHeight();
20 }
21 
23  return paragraph_->GetLongestLine();
24 }
25 
27  return paragraph_->GetMinIntrinsicWidth();
28 }
29 
31  return paragraph_->GetMaxIntrinsicWidth();
32 }
33 
35  return paragraph_->GetIdeographicBaseline();
36 }
37 
39  return paragraph_->GetAlphabeticBaseline();
40 }
41 
42 uint32_t Paragraph::GetLineCount() const {
43  return paragraph_->GetNumberOfLines();
44 }
45 
46 const std::unique_ptr<txt::Paragraph>& Paragraph::GetHandle() const {
47  return paragraph_;
48 }
49 
50 } // namespace impeller::interop
impeller::interop::Paragraph::~Paragraph
~Paragraph() override
paragraph.h
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::GetMaxIntrinsicWidth
Scalar GetMaxIntrinsicWidth() const
Definition: paragraph.cc:30
std
Definition: comparable.h:95
impeller::interop::Paragraph::GetAlphabeticBaseline
Scalar GetAlphabeticBaseline() const
Definition: paragraph.cc:38
impeller::interop::Paragraph::GetLineCount
uint32_t GetLineCount() const
Definition: paragraph.cc:42