parameters: (ctx)
docstring: Compute the new atlas size
docstring_summary: Compute the new atlas size
docstring_tokens: Compute the new atlas size
function: def shrink_atlas(ctx):
      """ Compute the new atlas size """
  
      width = 0
      height = 0
      for sub_image in ctx.sub_images:
          width = max(width, sub_image.atlas_x + sub_image.width + ctx.margin)
          height = max(height, sub_image.atlas_y + sub_image.height + ctx.margin)
  
      ctx.atlas_width = next_power_of_two(width)
      ctx.atlas_height = next_power_of_two(height)
function_tokens: def shrink_atlas ( ctx ) : width = 0 height = 0 for sub_image in ctx . sub_images : width = max ( width , sub_image . atlas_x + sub_image . width + ctx . margin ) height = max ( height , sub_image . atlas_y + sub_image . height + ctx . margin ) ctx . atlas_width = next_power_of_two ( width ) ctx . atlas_height = next_power_of_two ( height )