Flutter Engine
txt::PaintRecord Class Reference

#include <paint_record.h>

Public Member Functions

 PaintRecord ()=delete
 
 ~PaintRecord ()
 
 PaintRecord (TextStyle style, SkPoint offset, sk_sp< SkTextBlob > text, SkFontMetrics metrics, size_t line, double x_start, double x_end, bool is_ghost)
 
 PaintRecord (TextStyle style, SkPoint offset, sk_sp< SkTextBlob > text, SkFontMetrics metrics, size_t line, double x_start, double x_end, bool is_ghost, PlaceholderRun *placeholder_run)
 
 PaintRecord (TextStyle style, sk_sp< SkTextBlob > text, SkFontMetrics metrics, size_t line, double x_start, double x_end, bool is_ghost)
 
 PaintRecord (PaintRecord &&other)
 
PaintRecordoperator= (PaintRecord &&other)
 
SkPoint offset () const
 
void SetOffset (SkPoint pt)
 
SkTextBlob * text () const
 
const SkFontMetrics & metrics () const
 
const TextStylestyle () const
 
size_t line () const
 
double x_start () const
 
double x_end () const
 
double GetRunWidth () const
 
PlaceholderRunGetPlaceholderRun () const
 
bool isGhost () const
 
bool isPlaceholder () const
 

Detailed Description

Definition at line 32 of file paint_record.h.

Constructor & Destructor Documentation

◆ PaintRecord() [1/5]

txt::PaintRecord::PaintRecord ( )
delete

◆ ~PaintRecord()

txt::PaintRecord::~PaintRecord ( )
default

◆ PaintRecord() [2/5]

txt::PaintRecord::PaintRecord ( TextStyle  style,
SkPoint  offset,
sk_sp< SkTextBlob >  text,
SkFontMetrics  metrics,
size_t  line,
double  x_start,
double  x_end,
bool  is_ghost 
)

Definition at line 25 of file paint_record.cc.

33  : style_(style),
34  offset_(offset),
35  text_(std::move(text)),
36  metrics_(metrics),
37  line_(line),
38  x_start_(x_start),
39  x_end_(x_end),
40  is_ghost_(is_ghost) {}
double x_end() const
Definition: paint_record.h:82
const SkFontMetrics & metrics() const
Definition: paint_record.h:75
size_t line() const
Definition: paint_record.h:79
double x_start() const
Definition: paint_record.h:81
SkPoint offset() const
Definition: paint_record.h:69
SkTextBlob * text() const
Definition: paint_record.h:73
const TextStyle & style() const
Definition: paint_record.h:77

◆ PaintRecord() [3/5]

txt::PaintRecord::PaintRecord ( TextStyle  style,
SkPoint  offset,
sk_sp< SkTextBlob >  text,
SkFontMetrics  metrics,
size_t  line,
double  x_start,
double  x_end,
bool  is_ghost,
PlaceholderRun placeholder_run 
)

Definition at line 42 of file paint_record.cc.

51  : style_(style),
52  offset_(offset),
53  text_(std::move(text)),
54  metrics_(metrics),
55  line_(line),
56  x_start_(x_start),
57  x_end_(x_end),
58  is_ghost_(is_ghost),
59  placeholder_run_(placeholder_run) {}
double x_end() const
Definition: paint_record.h:82
const SkFontMetrics & metrics() const
Definition: paint_record.h:75
size_t line() const
Definition: paint_record.h:79
double x_start() const
Definition: paint_record.h:81
SkPoint offset() const
Definition: paint_record.h:69
SkTextBlob * text() const
Definition: paint_record.h:73
const TextStyle & style() const
Definition: paint_record.h:77

◆ PaintRecord() [4/5]

txt::PaintRecord::PaintRecord ( TextStyle  style,
sk_sp< SkTextBlob >  text,
SkFontMetrics  metrics,
size_t  line,
double  x_start,
double  x_end,
bool  is_ghost 
)

Definition at line 61 of file paint_record.cc.

68  : style_(style),
69  text_(std::move(text)),
70  metrics_(metrics),
71  line_(line),
72  x_start_(x_start),
73  x_end_(x_end),
74  is_ghost_(is_ghost) {}
double x_end() const
Definition: paint_record.h:82
const SkFontMetrics & metrics() const
Definition: paint_record.h:75
size_t line() const
Definition: paint_record.h:79
double x_start() const
Definition: paint_record.h:81
SkTextBlob * text() const
Definition: paint_record.h:73
const TextStyle & style() const
Definition: paint_record.h:77

◆ PaintRecord() [5/5]

txt::PaintRecord::PaintRecord ( PaintRecord &&  other)

Definition at line 76 of file paint_record.cc.

76  {
77  style_ = other.style_;
78  offset_ = other.offset_;
79  text_ = std::move(other.text_);
80  metrics_ = other.metrics_;
81  line_ = other.line_;
82  placeholder_run_ = other.placeholder_run_;
83  x_start_ = other.x_start_;
84  x_end_ = other.x_end_;
85  is_ghost_ = other.is_ghost_;
86 }

Member Function Documentation

◆ GetPlaceholderRun()

PlaceholderRun* txt::PaintRecord::GetPlaceholderRun ( ) const
inline

Definition at line 85 of file paint_record.h.

85 { return placeholder_run_; }

◆ GetRunWidth()

double txt::PaintRecord::GetRunWidth ( ) const
inline

Definition at line 83 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

83 { return x_end_ - x_start_; }

◆ isGhost()

bool txt::PaintRecord::isGhost ( ) const
inline

Definition at line 87 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

87 { return is_ghost_; }

◆ isPlaceholder()

bool txt::PaintRecord::isPlaceholder ( ) const
inline

Definition at line 89 of file paint_record.h.

89 { return placeholder_run_ == nullptr; }

◆ line()

size_t txt::PaintRecord::line ( ) const
inline

Definition at line 79 of file paint_record.h.

79 { return line_; }

◆ metrics()

const SkFontMetrics& txt::PaintRecord::metrics ( ) const
inline

Definition at line 75 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

75 { return metrics_; }

◆ offset()

SkPoint txt::PaintRecord::offset ( ) const
inline

Definition at line 69 of file paint_record.h.

References SetOffset().

Referenced by txt::ParagraphTxt::Paint().

69 { return offset_; }

◆ operator=()

PaintRecord & txt::PaintRecord::operator= ( PaintRecord &&  other)

Definition at line 88 of file paint_record.cc.

88  {
89  style_ = other.style_;
90  offset_ = other.offset_;
91  text_ = std::move(other.text_);
92  metrics_ = other.metrics_;
93  line_ = other.line_;
94  x_start_ = other.x_start_;
95  x_end_ = other.x_end_;
96  is_ghost_ = other.is_ghost_;
97  placeholder_run_ = other.placeholder_run_;
98  return *this;
99 }

◆ SetOffset()

void txt::PaintRecord::SetOffset ( SkPoint  pt)

Definition at line 101 of file paint_record.cc.

Referenced by offset().

101  {
102  offset_ = pt;
103 }

◆ style()

const TextStyle& txt::PaintRecord::style ( ) const
inline

Definition at line 77 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

77 { return style_; }

◆ text()

SkTextBlob* txt::PaintRecord::text ( ) const
inline

Definition at line 73 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

73 { return text_.get(); }

◆ x_end()

double txt::PaintRecord::x_end ( ) const
inline

Definition at line 82 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

82 { return x_end_; }

◆ x_start()

double txt::PaintRecord::x_start ( ) const
inline

Definition at line 81 of file paint_record.h.

Referenced by txt::ParagraphTxt::Paint().

81 { return x_start_; }

The documentation for this class was generated from the following files: