Querying the Viewport Tree       package:grid       R Documentation

_G_e_t _t_h_e _C_u_r_r_e_n_t _G_r_i_d _V_i_e_w_p_o_r_t (_T_r_e_e)

_D_e_s_c_r_i_p_t_i_o_n:

     'current.viewport()' returns the viewport that Grid is going to
     draw into.

     'current.vpTree' returns the entire Grid viewport tree.

     'current.transform' returns the transformation matrix for the
     current viewport.

_U_s_a_g_e:

     current.viewport(vp=NULL)
     current.vpTree(all=TRUE)
     current.transform()

_A_r_g_u_m_e_n_t_s:

      vp: A Grid viewport object.  Use of this argument has been
          deprecated.

     all: A logical value indicating whether the entire viewport tree
          should be returned.

_D_e_t_a_i_l_s:

     If 'all' is 'FALSE' then 'current.vpTree' only returns the subtree
     below the current viewport.

_V_a_l_u_e:

     A Grid viewport object.

_A_u_t_h_o_r(_s):

     Paul Murrell

_S_e_e _A_l_s_o:

     'viewport'

_E_x_a_m_p_l_e_s:

     grid.newpage()
     pushViewport(viewport(width=0.8, height=0.8, name="A"))
     pushViewport(viewport(x=0.1, width=0.3, height=0.6,
       just="left", name="B"))
     upViewport(1)
     pushViewport(viewport(x=0.5, width=0.4, height=0.8,
       just="left", name="C"))
     pushViewport(viewport(width=0.8, height=0.8, name="D"))
     upViewport(1)
     current.vpTree()
     current.viewport()
     current.vpTree(all=FALSE)

