Пример #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));
        }
Пример #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));
        }
Пример #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_));
        }
Пример #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];
            }
        }
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #16
0
 public static void nk_draw_list_path_fill(nk_draw_list *dl, nk_color col) => _nk_draw_list_path_fill(dl, col);
Пример #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);
Пример #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);
Пример #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);
Пример #20
0
 public static void nk_fill_circle(nk_command_buffer *cbuf, nk_rect r, nk_color col) => _nk_fill_circle(cbuf, r, col);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);
Пример #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);