void draw_point(t_plane *x, t_object *view, t_rect *rect) { t_elayer *g = ebox_start_layer((t_ebox *)x, gensym("point_layer"), rect->width, rect->height); if (g) { t_matrix matrix; // Here, an example matrix egraphics_matrix_init(&matrix, x->f_ratio.x, 0.f, 0.f, -x->f_ratio.y, x->f_boundaries.x * -x->f_ratio.x, rect->height + x->f_boundaries.y * x->f_ratio.y); egraphics_set_matrix(g, &matrix); egraphics_set_color_rgba(g, &x->f_color_point); // We use oval to keep a perfect circle with the matrix stranformation egraphics_oval(g, x->f_position.x, x->f_position.y, x->f_size / x->f_ratio.x, x->f_size / x->f_ratio.y); egraphics_set_line_width(g, 2); egraphics_fill(g); ebox_end_layer((t_ebox*)x, gensym("point_layer")); } ebox_paint_layer((t_ebox *)x, gensym("point_layer"), x->f_size + 1, -x->f_size - 1); }
void egraphics_circle(t_elayer *g, float xc, float yc, float radius) { egraphics_oval(g, xc, yc, radius, radius); }