MCPcopy Create free account
hub / github.com/aseprite/laf / BoxBuilder

Class BoxBuilder

examples/text_shape.cpp:43–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 std::vector<Box> boxes;
42
43 class BoxBuilder : public TextBlob::RunHandler {
44 public:
45 BoxBuilder() {}
46 const std::vector<Box>& boxes() const { return m_boxes; }
47
48 // TextBlob::RunHandler impl
49 void commitRunBuffer(TextBlob::RunInfo& info) override
50 {
51 Box box;
52 for (int i = 0; i < info.glyphCount; ++i) {
53 box.utf8Range = info.getGlyphUtf8Range(i);
54 box.bounds = info.getGlyphBounds(i);
55 m_boxes.push_back(box);
56 }
57 }
58
59 private:
60 std::vector<Box> m_boxes;
61 };
62
63 void makeCaretVisible()
64 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected