MCPcopy Create free account
hub / github.com/Snapchat/Valdi / drawTextShadows

Method drawTextShadows

snap_drawing/src/snap_drawing/cpp/Layers/TextLayer.cpp:141–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 auto layerSize = Size::make(getFrame().width(), getFrame().height());
140 auto& layout = getTextLayout(layerSize, *getResources());
141 auto offsetY = getTextVerticalOffset(layerSize, layout, displayScale);
142 auto childrenSize = childrenLayer.getChildrenSize();
143 struct InlineChildLayout {
144 Ref<Valdi::TextInlineAttachment> attachment;
145 Rect bounds;
146 };
147 std::vector<InlineChildLayout> childIndexToInlineChildLayouts(childrenSize);
148
149 for (const auto& attachment : layout.getAttachments()) {
150 auto inlineViewAttachment = Valdi::castOrNull<Valdi::TextInlineAttachment>(attachment.attachment);
151 if (inlineViewAttachment == nullptr) {
152 continue;
153 }
154

Callers

nothing calls this directly

Calls 6

getSkValueMethod · 0.80
canvasMethod · 0.80
getMethod · 0.65
setMaskFilterMethod · 0.45
setColorMethod · 0.45
setAlphaMethod · 0.45

Tested by

no test coverage detected