Lines Matching defs:cluster

22         ClusterPos(Cluster* cluster, size_t pos) : fCluster(cluster), fPos(pos) {}
23 inline Cluster* cluster() const { return fCluster; }
57 inline Cluster* startCluster() const { return fStart.cluster(); }
58 inline Cluster* endCluster() const { return fEnd.cluster(); }
59 inline Cluster* breakCluster() const { return fBreak.cluster(); }
63 bool endOfCluster() { return fEnd.position() == fEnd.cluster()->endPos(); }
66 (fEnd.cluster()->isHardBreak() || fEnd.cluster()->isSoftBreak());
76 bool empty() { return fStart.cluster() == fEnd.cluster() &&
81 void extend(Cluster* cluster) {
82 if (fStart.cluster() == nullptr) {
83 fStart = ClusterPos(cluster, cluster->startPos());
85 fEnd = ClusterPos(cluster, cluster->endPos());
87 auto& r = cluster->run();
88 if (!cluster->isHardBreak() && !r.isPlaceholder()) {
92 fWidth += cluster->width();
95 void extend(Cluster* cluster, size_t pos) {
96 fEnd = ClusterPos(cluster, pos);
97 if (auto r = cluster->runOrNull()) {
102 void startFrom(Cluster* cluster, size_t pos) {
103 fStart = ClusterPos(cluster, pos);
104 fEnd = ClusterPos(cluster, pos);
105 if (auto r = cluster->runOrNull()) {
131 if (fEnd.cluster() != nullptr &&
132 fEnd.cluster()->owner() != nullptr &&
133 fEnd.cluster()->runOrNull() != nullptr &&
134 fEnd.cluster()->run().placeholderStyle() == nullptr &&
136 fWidth -= (fEnd.cluster()->width() - fEnd.cluster()->trimmedWidth(fEnd.position()));
140 void trim(Cluster* cluster) {
141 SkASSERT(fEnd.cluster() == cluster);
142 if (fEnd.cluster() > fStart.cluster()) {
144 fWidth -= cluster->width();
231 SkScalar calculateFakeSpacing(Cluster* cluster, bool autoSpacingEnable);