예제 #1
0
void draw_test (int id, ps_context* gc)
{
    ps_color col = {0, 0, 1, 1};
    ps_color sol = {1, 0, 0, 1};
    ps_rect cr = {2.7f , 3.4f, 272.4f, 261.3f};
    ps_point s = {50.1f, 50.3f};
    ps_point e = {200.7f, 50.3f};

    ps_point p[3] = {{100,100},{200, 300},{ 300, 40}};
    ps_point cp = {128, 128};
    ps_point sc = {10, 228};
    ps_rect br = {50, 50, 120, 100};

    ps_set_line_width(gc, 1);
    ps_set_stroke_color(gc, &sol);

//    ps_set_line_dash(gc, dashs[0].s, dashs[0].d, 4);
    ps_set_source_color(gc, &col);
    ps_arc (gc, &cp, 10 , 0, 6.28f, True);
    ps_stroke(gc);

//    ps_set_line_dash(gc, dashs[1].s, dashs[1].d, 4);
    ps_tangent_arc(gc, &br, 0, 1.254f);
    ps_stroke(gc);
    ps_move_to(gc, &sc);
    ps_bezier_curve_to(gc, &p[0], &p[1], &p[2]);

    ps_arc (gc, &cp, 100 , 0.785f, 3.140f, False);
    
    ps_bezier_curve_to(gc, &p[0], &p[1], &p[2]);
    
//    ps_set_line_dash(gc, dashs[2].s, dashs[2].d, 4);
    ps_quad_curve_to(gc, &p[1], &p[2]);
    ps_stroke(gc);

//    ps_set_line_dash(gc, dashs[3].s, dashs[3].d, 4);
    ps_rectangle(gc, &cr);
    ps_rounded_rect(gc, &gt, 45.2f, 35.2f, 25.2f, 25.2f, 35.2f, 55.2f, 65.2f, 85.2f);
    ps_ellipse(gc, &gr);
    ps_stroke(gc);

//    ps_reset_line_dash(gc);
    ps_move_to(gc, &s);
    ps_line_to(gc, &e);
    ps_stroke(gc);
}
예제 #2
0
void ps_circle(t_psdata ps, real x1, real y1, real rad)
{
    ps_arc(ps, x1, y1, rad, 0, 360);
}
예제 #3
0
파일: writeps.c 프로젝트: Chadi-akel/cere
void ps_circle(FILE *ps,real x1,real y1,real rad)
{
  ps_arc(ps,x1,y1,rad,0,360);
}