123 {
126
129
131
132
136 if (scaledRotations.
empty()) {
137
138 auto scaleAndTranslateRect =
144 };
145
149 bounds.join(scaleAndTranslateRect(r,
pos));
150 }
151 }
153 } else {
154
156 for (
auto [
pos, scaleRotate, glyph] :
SkMakeZip(positions, scaledRotations,
glyphs)) {
157 if (!glyph->rect().isEmpty()) {
160 xform.
preScale(strikeToSourceScale, strikeToSourceScale);
162 }
163 }
165 }
166 }
167
168
169 if (scaledRotations.
empty()) {
177 } else {
178
181 for (
auto [
pos, scaleRotate] :
SkMakeZip(positions, scaledRotations)) {
184 }
186 }
187}
constexpr int SkCount(const Container &c)
constexpr auto SkMakeZip(Ts &&... ts)
static SkRect GetFontBounds(const SkFont &)
SkMatrix & setRSXform(const SkRSXform &rsxForm)
SkMatrix & preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
constexpr T * data() const
constexpr bool empty() const
static std::tuple< SkStrikeSpec, SkScalar > MakeCanonicalized(const SkFont &font, const SkPaint *paint=nullptr)
Optional< SkRect > bounds
constexpr float y() const
constexpr float x() const
static constexpr SkRect MakeEmpty()
constexpr float left() const
constexpr float top() const
constexpr float right() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
constexpr float bottom() const