Example #1
0
        public static nk_colorf nk_color_cf(nk_color _in_)
        {
            nk_colorf o = new nk_colorf();

            nk_color_f(&o.r, &o.g, &o.b, &o.a, (nk_color)(_in_));
            return((nk_colorf)(o));
        }
Example #2
0
        public static nk_style_item nk_style_item_color(nk_color col)
        {
            nk_style_item i = new nk_style_item();

            i.type       = (int)(NK_STYLE_ITEM_COLOR);
            i.data.color = (nk_color)(col);
            return((nk_style_item)(i));
        }
Example #3
0
        public static uint nk_color_u32(nk_color _in_)
        {
            uint _out_ = (uint)(_in_.r);

            _out_ |= (uint)((uint)(_in_.g) << 8);
            _out_ |= (uint)((uint)(_in_.b) << 16);
            _out_ |= (uint)((uint)(_in_.a) << 24);
            return((uint)(_out_));
        }
Example #4
0
        public static void nk_stroke_polygon(nk_command_buffer b, float *points, int point_count, float line_thickness,
                                             nk_color col)
        {
            if ((b == null) || (col.a == 0) || (line_thickness <= 0))
            {
                return;
            }
            var cmd = (nk_command_polygon)nk_command_buffer_push(b, NK_COMMAND_POLYGON);

            if (cmd == null)
            {
                return;
            }
            cmd.color          = col;
            cmd.line_thickness = (ushort)line_thickness;
            cmd.point_count    = (ushort)point_count;
            cmd.points         = new nk_vec2i[point_count];
            for (var i = 0; i < point_count; ++i)
            {
                cmd.points[i].x = (short)points[i * 2];
                cmd.points[i].y = (short)points[i * 2 + 1];
            }
        }
Example #5
0
 public static void nk_draw_list_add_image(nk_draw_list *dl, nk_image texture, nk_rect rect, nk_color col) => _nk_draw_list_add_image(dl, texture, rect, col);
Example #6
0
 public static void nk_draw_list_fill_circle(nk_draw_list *dl, nk_vec2 center, float radius, nk_color col, uint segs) => _nk_draw_list_fill_circle(dl, center, radius, col, segs);
Example #7
0
 public static void nk_draw_list_fill_rect_multi_color(nk_draw_list *dl, nk_rect rect, nk_color left, nk_color top, nk_color right, nk_color bottom) => _nk_draw_list_fill_rect_multi_color(dl, rect, left, top, right, bottom);
Example #8
0
 public static void nk_draw_list_stroke_poly_line(nk_draw_list *dl, nk_vec2 *pnts, uint cnt, nk_color col, nk_draw_list_stroke stroke, float thickness, nk_anti_aliasing aa) => _nk_draw_list_stroke_poly_line(dl, pnts, cnt, col, stroke, thickness, aa);
Example #9
0
 public static void nk_draw_list_stroke_circle(nk_draw_list *dl, nk_vec2 center, float radius, nk_color col, uint segs, float thickness) => _nk_draw_list_stroke_circle(dl, center, radius, col, segs, thickness);
Example #10
0
 public static void nk_draw_list_stroke_rect(nk_draw_list *dl, nk_rect rect, nk_color col, float rounding, float thickness) => _nk_draw_list_stroke_rect(dl, rect, col, rounding, thickness);
Example #11
0
 public static void nk_fill_rect(nk_command_buffer *cbuf, nk_rect r, float rounding, nk_color col) => _nk_fill_rect(cbuf, r, rounding, col);
Example #12
0
 public static void nk_stroke_polygon(nk_command_buffer *cbuf, float *points, int point_count, float line_thickness, nk_color col) => _nk_stroke_polygon(cbuf, points, point_count, line_thickness, col);
Example #13
0
 public static void nk_stroke_triangle(nk_command_buffer *cbuf, float x0, float y0, float x1, float y1, float x2, float y2, float line_thickness, nk_color col) => _nk_stroke_triangle(cbuf, x0, y0, x1, y1, x2, y2, line_thickness, col);
Example #14
0
 public static void nk_stroke_arc(nk_command_buffer *cbuf, float cx, float cy, float radius, float a_min, float a_max, float line_thickness, nk_color col) => _nk_stroke_arc(cbuf, cx, cy, radius, a_min, a_max, line_thickness, col);
Example #15
0
 public static void nk_stroke_circle(nk_command_buffer *cbuf, nk_rect r, float line_thickness, nk_color col) => _nk_stroke_circle(cbuf, r, line_thickness, col);
Example #16
0
 public static void nk_draw_list_path_fill(nk_draw_list *dl, nk_color col) => _nk_draw_list_path_fill(dl, col);
Example #17
0
 public static void nk_draw_list_path_stroke(nk_draw_list *dl, nk_color col, nk_draw_list_stroke closed, float thickness) => _nk_draw_list_path_stroke(dl, col, closed, thickness);
Example #18
0
 public static void nk_fill_rect_multi_color(nk_command_buffer *cbuf, nk_rect r, nk_color left, nk_color top, nk_color right, nk_color bottom) => _nk_fill_rect_multi_color(cbuf, r, left, top, right, bottom);
Example #19
0
 public static void nk_draw_list_stroke_triangle(nk_draw_list *dl, nk_vec2 a, nk_vec2 b, nk_vec2 c, nk_color col, float thickness) => _nk_draw_list_stroke_triangle(dl, a, b, c, col, thickness);
Example #20
0
 public static void nk_fill_circle(nk_command_buffer *cbuf, nk_rect r, nk_color col) => _nk_fill_circle(cbuf, r, col);
Example #21
0
 public static void nk_draw_list_stroke_curve(nk_draw_list *dl, nk_vec2 p0, nk_vec2 cp0, nk_vec2 cp1, nk_vec2 p1, nk_color col, uint segments, float thickness) => _nk_draw_list_stroke_curve(dl, p0, cp0, cp1, p1, col, segments, thickness);
Example #22
0
 public static void nk_fill_arc(nk_command_buffer *cbuf, float cx, float cy, float radius, float a_min, float a_max, nk_color col) => _nk_fill_arc(cbuf, cx, cy, radius, a_min, a_max, col);
Example #23
0
 public static void nk_draw_list_fill_rect(nk_draw_list *dl, nk_rect rect, nk_color col, float rounding) => _nk_draw_list_fill_rect(dl, rect, col, rounding);
Example #24
0
 public static void nk_fill_triangle(nk_command_buffer *cbuf, float x0, float y0, float x1, float y1, float x2, float y2, nk_color col) => _nk_fill_triangle(cbuf, x0, y0, x1, y1, x2, y2, col);
Example #25
0
 public static void nk_draw_list_fill_triangle(nk_draw_list *dl, nk_vec2 a, nk_vec2 b, nk_vec2 c, nk_color col) => _nk_draw_list_fill_triangle(dl, a, b, c, col);
Example #26
0
 public static void nk_fill_polygon(nk_command_buffer *cbuf, float *pts, int point_count, nk_color col) => _nk_fill_polygon(cbuf, pts, point_count, col);
Example #27
0
 public static void nk_draw_list_fill_poly_convex(nk_draw_list *dl, nk_vec2 *points, uint count, nk_color col, nk_anti_aliasing aa) => _nk_draw_list_fill_poly_convex(dl, points, count, col, aa);
Example #28
0
 public static void nk_draw_image(nk_command_buffer *cbuf, nk_rect r, nk_image *img, nk_color col) => _nk_draw_image(cbuf, r, img, col);
Example #29
0
 public static void nk_draw_list_add_text(nk_draw_list *dl, nk_user_font *userfont, nk_rect rect, byte *text, int len, float font_height, nk_color col) => _nk_draw_list_add_text(dl, userfont, rect, text, len, font_height, col);
Example #30
0
 public static void nk_draw_text(nk_command_buffer *cbuf, nk_rect r, byte *text, int len, nk_user_font *userfont, nk_color col, nk_color col2) => _nk_draw_text(cbuf, r, text, len, userfont, col, col2);