• Home
  • Raw
  • Download

Lines Matching refs:cluster

18         ClusterPos(Cluster* cluster, size_t pos) : fCluster(cluster), fPos(pos) {}  in ClusterPos()  argument
19 inline Cluster* cluster() const { return fCluster; } in cluster() function
49 inline Cluster* startCluster() const { return fStart.cluster(); } in startCluster()
50 inline Cluster* endCluster() const { return fEnd.cluster(); } in endCluster()
51 inline Cluster* breakCluster() const { return fBreak.cluster(); } in breakCluster()
55 bool endOfCluster() { return fEnd.position() == fEnd.cluster()->endPos(); } in endOfCluster()
58 (fEnd.cluster()->isHardBreak() || fEnd.cluster()->isSoftBreak()); in endOfWord()
68 bool empty() { return fStart.cluster() == fEnd.cluster() && in empty()
73 void extend(Cluster* cluster) { in extend() argument
74 if (fStart.cluster() == nullptr) { in extend()
75 fStart = ClusterPos(cluster, cluster->startPos()); in extend()
77 fEnd = ClusterPos(cluster, cluster->endPos()); in extend()
78 if (!cluster->run()->isPlaceholder()) { in extend()
79 fMetrics.add(cluster->run()); in extend()
81 fWidth += cluster->width(); in extend()
84 void extend(Cluster* cluster, size_t pos) { in extend() argument
85 fEnd = ClusterPos(cluster, pos); in extend()
86 if (cluster->run() != nullptr) { in extend()
87 fMetrics.add(cluster->run()); in extend()
91 void startFrom(Cluster* cluster, size_t pos) { in startFrom() argument
92 fStart = ClusterPos(cluster, pos); in startFrom()
93 fEnd = ClusterPos(cluster, pos); in startFrom()
94 if (cluster->run() != nullptr) { in startFrom()
95 fMetrics.add(cluster->run()); in startFrom()
112 if (fEnd.cluster() != nullptr && in trim()
113 fEnd.cluster()->master() != nullptr && in trim()
114 fEnd.cluster()->run() != nullptr && in trim()
115 fEnd.cluster()->run()->placeholderStyle() == nullptr && in trim()
117 fWidth -= (fEnd.cluster()->width() - fEnd.cluster()->trimmedWidth(fEnd.position())); in trim()
121 void trim(Cluster* cluster) { in trim() argument
122 SkASSERT(fEnd.cluster() == cluster); in trim()
123 if (fEnd.cluster() > fStart.cluster()) { in trim()
125 fWidth -= cluster->width(); in trim()