| 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
5 #include "impeller/toolkit/interop/paragraph.h"
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
14 Scalar Paragraph::GetMaxWidth() const {
15 return paragraph_->GetMaxWidth();
16 }
17
18 Scalar Paragraph::GetHeight() const {
19 return paragraph_->GetHeight();
20 }
21
22 Scalar Paragraph::GetLongestLineWidth() const {
23 return paragraph_->GetLongestLine();
24 }
25
26 Scalar Paragraph::GetMinIntrinsicWidth() const {
27 return paragraph_->GetMinIntrinsicWidth();
28 }
29
30 Scalar Paragraph::GetMaxIntrinsicWidth() const {
31 return paragraph_->GetMaxIntrinsicWidth();
32 }
33
34 Scalar Paragraph::GetIdeographicBaseline() const {
35 return paragraph_->GetIdeographicBaseline();
36 }
37
38 Scalar Paragraph::GetAlphabeticBaseline() const {
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::GetMaxWidth
Scalar GetMaxWidth() const
Definition: paragraph.cc:14
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::GetHeight
Scalar GetHeight() const
Definition: paragraph.cc:18
impeller::interop::Paragraph::GetLineCount
uint32_t GetLineCount() const
Definition: paragraph.cc:42
impeller::interop::Paragraph::GetIdeographicBaseline
Scalar GetIdeographicBaseline() const
Definition: paragraph.cc:34
impeller::interop::Paragraph::Paragraph
Paragraph(std::unique_ptr< txt::Paragraph > paragraph)
Definition: paragraph.cc:9
impeller::interop::Paragraph::GetAlphabeticBaseline
Scalar GetAlphabeticBaseline() const
Definition: paragraph.cc:38
impeller::interop::Paragraph::~Paragraph
~Paragraph() override
impeller::interop::Paragraph::GetMaxIntrinsicWidth
Scalar GetMaxIntrinsicWidth() const
Definition: paragraph.cc:30
impeller::interop::Paragraph::GetHandle
const std::unique_ptr< txt::Paragraph > & GetHandle() const
Definition: paragraph.cc:46
impeller::interop
Definition: color_filter.cc:7
impeller::Scalar
float Scalar
Definition: scalar.h:18
std
Definition: comparable.h:95
paragraph.h