R_GE_gcontext-class     package:RGraphicsDevice     R Documentation

_I_n_f_o_r_m_a_t_i_o_n _a_b_o_u_t _t_h_e _c_u_r_r_e_n_t _g_r_a_p_h_i_c_s _s_e_t_t_i_n_g_s/_c_o_n_t_e_x_t

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

     This is a one-to-one mapping of the C-level data structure used in
     R graphics devices and passed to device routines and it describes
     the current settings or state of the graphics "pen". It provides
     alues for the color, the background color, the line width, and
     line type, how lines are joined and ended, the character expansion
     factor, the size of a the font and line height, and font
     information. These are set and reset frequently and are stored in
     this context object rather than "globally" (across calls) within
     the device.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     We rarely construct objects of this type directly in R but rather
     are passed them in calls to R functions from the graphics engine.
     These functions  are those implementing R graphics device
     facilities.

     We might explicitly coerce the C-level reference to an R structure
     to have access to all of the fields in a single R object using
     'as(obj, "R_GE_gcontext")'. However, this is not necessary as we
     can access the individual fields as 'obj$col' as easily as
     'obj@col'.  There may be marginal benefits in speed if one is
     accessing the values of all the fields many, many times within the
     single R function call. But this requires measurement as the slot
     access of an S4 object may incur overheads comparable or exceeding
     that of the method dispatch and C interface.

_S_l_o_t_s:


     '_c_o_l': Object of class '"integer"' the color to draw text, lines,
          paths. This is the "foreground" color.

     '_f_i_l_l': Object of class '"integer"'  the background color used to
          fill regions such as rectangles, circles and polygons

     '_g_a_m_m_a': Object of class '"numeric"' the  

     '_l_w_d': Object of class '"numeric"' the width of a rendered line,
          typically in units of 1/96.

     '_l_t_y': Object of class '"integer"' the type of line, e.g. solid,
          dotted, dashed 

     '_l_e_n_d': Object of class '"R_GE_lineend"'  one of 'ROUND_CAP',
          'BUTT_CAP' and 'SQUARE_CAP' (currently integers at present
          and not enumeration types) 

     '_l_j_o_i_n': Object of class '"R_GE_linejoin"' how lines are joined.
          One of 'ROUND_JOIN', 'MITRE_JOIN', 'BEVEL_JOIN'. (Currently
          these are integers. You should coerce them to
          'R_GE_linejoin'.) 

     '_l_m_i_t_r_e': Object of class '"numeric"'  controls mitreing of lines

     '_c_e_x': Object of class '"numeric"'  character expansion factor
          with 'font size = fontsize * cex'

     '_p_s': Object of class '"numeric"'  font size in points

     '_l_i_n_e_h_e_i_g_h_t': Object of class '"numeric"'  height of a line which
          should be multiplied by the font size

     '_f_o_n_t_f_a_c_e': Object of class '"integer"'  font face such as  plain,
          italic, bold. These are given by integers.

     '_f_o_n_t_f_a_m_i_l_y': Object of class '"character"'  a character vector
          currently with 201 elements each of which is a single
          character, i.e. string of length 1. But this is may become a
          single string with 201 characters.

_E_x_t_e_n_d_s:

     Class '"CStruct-class"', directly.

_M_e_t_h_o_d_s:

     No methods defined with class "R_GE_gcontext" in the signature.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     The R Internals Manual, R Development Core Team.

_S_e_e _A_l_s_o:

     'graphicsDevice' 'RDevDescMethods-class'

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

     showClass("R_GE_gcontext")

