1 // Copyright 2021 Google LLC.
2 #include "experimental/sktext/editor/Selection.h"
4 using namespace skia::text;
9 void Selection::select(TextRange range, SkRect rect) {
13 fGlyphBoxes.emplace_back(rect);
14 fTextRanges.emplace_back(range);
17 void Selection::paint(SkCanvas* canvas, SkPoint xy) {
18 for (auto& box : fGlyphBoxes) {
20 SkRect::MakeXYWH(box.fLeft + xy.fX, box.fTop + xy.fY, box.width(), box.height()),