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

Method sizeThatFits

snap_drawing/src/snap_drawing/cpp/Layers/TextLayer.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 path.lineTo(bounds.right, centerY);
33 return path;
34}
35
36static void drawTextDecoration(DrawingContext& drawingContext,
37 Paint& paint,
38 TextLayoutDecorationStyle style,
39 const std::optional<TextCustomUnderlineStyle>& customUnderlineStyle,
40 const Rect& bounds) {
41 if (customUnderlineStyle) {
42 paint.setStroke(true);
43 paint.setStrokeWidth(customUnderlineStyle->height);
44 paint.setStrokeCap(PaintStrokeCapButt);

Callers

nothing calls this directly

Calls 6

getRespectDynamicTypeMethod · 0.80
getDynamicTypeScaleMethod · 0.80
getDisplayScaleMethod · 0.45
widthMethod · 0.45
getBoundsMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected