2#include "nuklear_internal.h"
10nk_handle_ptr(
void *ptr)
20 nk_zero_struct(handle);
25nk_subimage_ptr(void *ptr, nk_ushort w, nk_ushort h,
struct nk_rect r)
28 nk_zero(&s,
sizeof(s));
31 s.region[0] = (nk_ushort)r.x;
32 s.region[1] = (nk_ushort)r.y;
33 s.region[2] = (nk_ushort)r.w;
34 s.region[3] = (nk_ushort)r.h;
38nk_subimage_id(int id, nk_ushort w, nk_ushort h, struct
nk_rect r)
41 nk_zero(&s,
sizeof(s));
44 s.region[0] = (nk_ushort)r.x;
45 s.region[1] = (nk_ushort)r.y;
46 s.region[2] = (nk_ushort)r.w;
47 s.region[3] = (nk_ushort)r.h;
51nk_subimage_handle(
nk_handle handle, nk_ushort w, nk_ushort h, struct
nk_rect r)
54 nk_zero(&s,
sizeof(s));
57 s.region[0] = (nk_ushort)r.x;
58 s.region[1] = (nk_ushort)r.y;
59 s.region[2] = (nk_ushort)r.w;
60 s.region[3] = (nk_ushort)r.h;
67 nk_zero(&s,
sizeof(s));
77nk_image_ptr(void *ptr)
80 nk_zero(&s,
sizeof(s));
94 nk_zero(&s,
sizeof(s));
104nk_image_is_subimage(
const struct nk_image* img)
107 return !(img->w == 0 && img->h == 0);
116 NK_ASSERT(ctx->current);
117 NK_ASSERT(ctx->current->layout);
118 if (!ctx || !ctx->current || !ctx->current->layout)
return;
121 if (!nk_widget(&bounds, ctx))
return;
131 NK_ASSERT(ctx->current);
132 NK_ASSERT(ctx->current->layout);
133 if (!ctx || !ctx->current || !ctx->current->layout)
return;
136 if (!nk_widget(&bounds, ctx))
return;
main API and documentation file
NK_API void nk_draw_image(struct nk_command_buffer *, struct nk_rect, const struct nk_image *, struct nk_color)
misc