浏览代码

Fixed #525 by updating canvas example

vurtun 8 年之前
父节点
当前提交
0b95e3e5a0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      example/canvas.c

+ 1 - 1
example/canvas.c

@@ -370,8 +370,8 @@ canvas_begin(struct nk_context *ctx, struct nk_canvas *canvas, nk_flags flags,
 
 
     /* create/update window and set position + size */
     /* create/update window and set position + size */
     flags = flags & ~NK_WINDOW_DYNAMIC;
     flags = flags & ~NK_WINDOW_DYNAMIC;
+    nk_window_set_bounds(ctx, "Window", nk_rect(x, y, width, height));
     nk_begin(ctx, "Window", nk_rect(x, y, width, height), NK_WINDOW_NO_SCROLLBAR|flags);
     nk_begin(ctx, "Window", nk_rect(x, y, width, height), NK_WINDOW_NO_SCROLLBAR|flags);
-    nk_window_set_bounds(ctx, nk_rect(x, y, width, height));
 
 
     /* allocate the complete window space for drawing */
     /* allocate the complete window space for drawing */
     {struct nk_rect total_space;
     {struct nk_rect total_space;