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

Method PopTransform

paint/state.go:104–113  ·  view source on GitHub ↗

PopTransform pops transform off the stack and set to current transform must protect within render mutex lock (see Lock version)

()

Source from the content-addressed store, hash-verified

102// PopTransform pops transform off the stack and set to current transform
103// must protect within render mutex lock (see Lock version)
104func (rs *State) PopTransform() {
105 sz := len(rs.TransformStack)
106 if sz == 0 {
107 slog.Error("programmer error: paint.State.PopTransform: stack is empty")
108 rs.CurrentTransform = math32.Identity2()
109 return
110 }
111 rs.CurrentTransform = rs.TransformStack[sz-1]
112 rs.TransformStack = rs.TransformStack[:sz-1]
113}
114
115// PushBounds pushes the current bounds onto the stack and sets new bounds.
116// This is the essential first step in rendering. See [State.PushBoundsGeom]

Callers 13

RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80
RenderMethod · 0.80

Calls 2

Identity2Function · 0.92
ErrorMethod · 0.65

Tested by

no test coverage detected