Types
Boxy = ref object ## Index into layer textures for writing. ## Layers array for pushing and popping. ## Size x size dimensions of the atlas. ## Number of quads drawn so far in this batch. ## Max quads in a batch before issuing an OpenGL call. ## The current matrix. ## The matrix stack. ## Entires used by not flushed yet. ## Flag for if the tile is taken or not. ## Dimensions of the window frame.
- Source Edit
Procs
proc applyTransform(boxy: Boxy; m: Mat3) {....raises: [], tags: [], forbids: [].}
- Applies transform to the internal transform. Source Edit
proc beginFrame(boxy: Boxy; frameSize: IVec2; clearFrame = true) {.inline, ...raises: [BoxyError, GLerror], tags: [], forbids: [].}
- Source Edit
proc beginFrame(boxy: Boxy; frameSize: IVec2; proj: Mat4; clearFrame = true) {. ...raises: [BoxyError, GLerror], tags: [], forbids: [].}
- Starts a new frame. Source Edit
proc blurEffect(boxy: Boxy; radius: float32) {. ...raises: [BoxyError, GLerror, Exception, ValueError], tags: [], forbids: [].}
- Blurs the current layer Source Edit
proc clearAtlas(boxy: Boxy) {....raises: [PixieError, GLerror], tags: [], forbids: [].}
- Source Edit
proc clearTransform(boxy: Boxy) {....raises: [], tags: [], forbids: [].}
- Clears transform and transform stack. Source Edit
proc drawImage(boxy: Boxy; key: string; center: Vec2; angle: float32; tint = color(1, 1, 1, 1); scale: float32 = 1.0) {. ...raises: [KeyError, GLerror, Exception, ValueError], tags: [], forbids: [].}
- Draws image at center and rotated by angle. The image should have already been added. Source Edit
proc dropShadowEffect(boxy: Boxy; tint: Color; offset: Vec2; radius, spread: float32) {. ...raises: [BoxyError, GLerror, Exception, ValueError], tags: [], forbids: [].}
- Drop shadows the current layer Source Edit
proc fromScreen(boxy: Boxy; windowFrame: Vec2; v: Vec2): Vec2 {....raises: [], tags: [], forbids: [].}
- Takes a point from screen and translates it to point inside the current transform. Source Edit
proc getImageSize(boxy: Boxy; key: string): IVec2 {....raises: [KeyError], tags: [], forbids: [].}
- Return the size of an inserted image. Source Edit
proc getTransform(boxy: Boxy): Mat3 {....raises: [], tags: [], forbids: [].}
- Gets the internal transform. Source Edit
proc removeImage(boxy: Boxy; key: string) {....raises: [BoxyError, KeyError], tags: [], forbids: [].}
- Removes an image, does nothing if the image has not been added. Source Edit
proc restoreTransform(boxy: Boxy) {....raises: [], tags: [], forbids: [].}
- Pops a transform off the stack. Source Edit
proc saveTransform(boxy: Boxy) {....raises: [], tags: [], forbids: [].}
- Pushes a transform onto the stack. Source Edit
proc setTransform(boxy: Boxy; m: Mat3) {....raises: [], tags: [], forbids: [].}
- Sets the internal transform. Source Edit