working build & fixed the double padding

This commit is contained in:
Stefan Stefanov 2024-04-22 20:09:42 +03:00
parent 6863124384
commit 1f1a0ee48d
3 changed files with 4 additions and 4 deletions

View file

@ -202,7 +202,7 @@ draw_atlas_settings_and_preview :: proc() {
height = small_offset,
},
" Enable padding",
&g_mem.packer_settings.fix_pixel_bleeding,
&g_mem.packer_settings.padding_enabled,
)
elements_height += small_offset * 2

View file

@ -114,8 +114,8 @@ pack_atlas_entries :: proc(entries: []AtlasEntry, atlas: ^rl.Image, offset_x: i3
for entry, entryIdx in all_entries {
entry_stb_rect := &rects[entryIdx]
entry_stb_rect.w = stbrp.Coord(entry.width + offset_x * 2)
entry_stb_rect.h = stbrp.Coord(entry.height + offset_y * 2)
entry_stb_rect.w = stbrp.Coord(entry.width + offset_x)
entry_stb_rect.h = stbrp.Coord(entry.height + offset_y)
}
ctx: stbrp.Context