PopTransform pops transform off the stack and set to current transform must protect within render mutex lock (see Lock version)
()
| 102 | // PopTransform pops transform off the stack and set to current transform |
| 103 | // must protect within render mutex lock (see Lock version) |
| 104 | func (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] |