Table of Contents

Class: Texture rdpyg/util/pack_textures.py

One texture which holds multiple smaller ones packed in.

x,y bottom left is 0,0. Which is like opengl, and not like sdl.

Methods   
__init__
__repr__
_bottom_left_first
_brute_force
clear
collide
could_fit
search_for_fit
try_fit
try_fit_batch
  __init__ 
__init__ (
        self,
        x,
        y,
        height,
        width,
        )

  __repr__ 
__repr__ ( self )

  _bottom_left_first 
_bottom_left_first ( self,  o )

do a search from bottom left. Return True if successful, else false. o - other texture.

  _brute_force 
_brute_force ( self,  o )

do a brute force search from bottom left to top right. Return True if successful, else false. o - other texture.

  clear 
clear ( self )

clears all the textures in this one.

  collide 
collide ( self,  other_texture )

checks this texture only to see if it collides. Returns True if it does collide.

  could_fit 
could_fit ( self,  other_texture )

checks this texture only to see if it fits. Does not care about any textures inside.

  search_for_fit 
search_for_fit ( self,  o )

do a search for a place to put the texture, and place it. Return True if successful, else false. o - other texture.

  try_fit 
try_fit ( self,  other_texture )

Tries to fit the texture into itself. Returns true if successful.

  try_fit_batch 
try_fit_batch ( self,  other_textures )

Tries to fit the textures into itself. Returns true if successful???. Or returns the unfitted ones?


Table of Contents

This document was automatically generated on Sat Jul 30 12:45:42 2005 by HappyDoc version 2.1