Sounds like a state issue. Some draw functions force a state (blend mode, scissors, constants etc.) and might not necessarily clean up after themselves. It’s generally good practice to be explicit with states, like enabling alpha when you need it, and disable when you’re done. Some go as far as storing the previous state, set their own, draw stuff, and then restore back to the previous state. There aren’t concrete guidelines here, but generally if something must be turned on, or modified, it’s considered a state change which may affect drawing further down the gl pipeline.
Right. When doing a localized transform, it’s common to push a new matrix, make your transforms, draw stuff, then pop the matrix, restoring it back to before it was transformed. Blender offers a context manager which does the boilerplate code for you:
def draw(): # Draw inside a new matrix layer with gpu.matrix.push_pop(): gpu.matrix.translate(x, y) # (draw something) # Leaving the with-block reverts the matrix back # (draw something else)