simvx.graphics.draw2d_batch

Scissor clipping and draw batch management for Draw2D.

Groups per-frame geometry into batches separated by clip-rect changes, then converts raw tuple lists to structured numpy arrays for GPU upload.

Module Contents

Classes

Draw2DBatchMixin

Mixin providing scissor clipping and batch management for Draw2D.

API

class simvx.graphics.draw2d_batch.Draw2DBatchMixin[source]

Mixin providing scissor clipping and batch management for Draw2D.

classmethod push_clip(x: int, y: int, w: int, h: int)[source]

Push a scissor clip rect. Content outside is not drawn.

Nested clips are intersected with the current clip.

classmethod pop_clip()[source]

Pop the last clip rect, restoring the previous one.

classmethod new_layer()[source]

Force a batch break so subsequent draws render on top of all prior geometry.

classmethod reset_clip()[source]

Clear the clip stack and current clip, restoring full-screen drawing.