vurtun/nuklear

how to know image dimensions?

an146 opened this issue · 1 comments

an146 commented

I've tried to modify function icon_load, but it never renders now. I want to nk_image.{w,h} to be filled and respected when drawing button icon (icon being scaled preserving aspect)

Whatever you're using to load the image should give you the size, as specified in the image file. You'll have to fill these (x, y) in yourself. If you're using stbi_load_*(), then you'll notice it takes an x and y pointer.