MCPcopy Create free account
hub / github.com/cogentcore/core / IsParText

Method IsParText

svg/text.go:71–73  ·  view source on GitHub ↗

IsParText returns true if this element serves as a parent text element to tspan elements within it. This is true if NumChildren() > 0 and Text == ""

()

Source from the content-addressed store, hash-verified

69// to tspan elements within it. This is true if NumChildren() > 0 and
70// Text == ""
71func (g *Text) IsParText() bool {
72 return g.NumChildren() > 0 && g.Text == ""
73}
74
75func (g *Text) SetNodePos(pos math32.Vector2) {
76 g.Pos = pos

Callers 6

NodeBBoxMethod · 0.95
RenderMethod · 0.95
ApplyTransformMethod · 0.95
ApplyDeltaTransformMethod · 0.95
WriteGeomMethod · 0.95
ReadGeomMethod · 0.95

Calls 1

NumChildrenMethod · 0.80

Tested by

no test coverage detected