GE_ROUND_CAP         package:RGraphicsDevice         R Documentation

_S_y_m_b_o_l_i_c _C_o_n_s_t_a_n_t_s _f_o_r _l_i_n_e _e_n_d_i_n_g_s _a_n_d _l_i_n_e _j_o_i_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     These R values are symbolic constants that provide conceptual
     names for specific values used in C code. These control the
     appearance of the join between two lines rendered on a graphics
     device and also how the end of a line appears.

     These symbolic constants correspond to enumerated constants in C
     code.

_U_s_a_g_e:

     GE_BEVEL_JOIN

_F_o_r_m_a_t:

     These are objects of class 'R_GE_lineend' or 'R_GE_linejoin'.

_S_o_u_r_c_e:

     The R Graphics Engine code.

_E_x_a_m_p_l_e_s:

       line = function(x1, y1, x2, y2, gcontext, dev) {
                # Use the value
           if(gcontext@lend == GE_ROUND_CAP) {
              
           } else if(gcontext@lend == GE_BUTT_CAP) {

           } else if(gcontext@lend == GE_SQUARE_CAP) {

           }

               # Use the name.
           switch(names(gcontext@ljoin),
                  "GE_BEVEL_JOIN" = "bevel",
                  "GE_MITRE_JOIN" = "mitre",
                  "GE_ROUND_JOIN" = "round")
       }

