%%
%% This is file `l3dvips.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% l3drivers.dtx  (with options: `package,dvips')
%% 
%% EXPERIMENTAL CODE
%% 
%% Do not distribute this file without also distributing the
%% source files specified above.
%% 
%% Do not distribute a modified version of this file.
%% 
%% File: l3drivers.dtx Copyright(C) 2011-2014 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version.  The latest version
%% of this license is in the file
%%
%%    http://www.latex-project.org/lppl.txt
%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%%    http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%%   Snapshots taken from the repository represent work in progress and may
%%   not work or may contain conflicting material!  We therefore ask
%%   people _not_ to put them into distributions, archives, etc. without
%%   prior consultation with the LaTeX Project Team.
%%
%% -----------------------------------------------------------------------
%%
\GetIdInfo$Id: l3drivers.dtx 5308 2014-08-20 01:22:39Z bruno $
  {L3 Experimental drivers}
\ProvidesExplFile
  {l3dvips.def}{\ExplFileDate}{\ExplFileVersion}
  {L3 Experimental driver: dvips}
\cs_new_protected_nopar:Npn \__driver_state_save:
  { \tex_special:D { ps:gsave } }
\cs_new_protected_nopar:Npn \__driver_state_restore:
  { \tex_special:D { ps:grestore } }
\cs_new_protected:Npn \__driver_literal:n #1
  {
    \tex_special:D
      {
        ps:
          currentpoint~
          currentpoint~translate~
          #1 ~
          neg~exch~neg~exch~translate
      }
  }
\cs_new_protected:Npn \__driver_literal_direct:n #1
  { \tex_special:D { ps:: #1 } }
\cs_new:Npn \__driver_absolute_lengths:n #1
  {
     /savedmatrix~matrix~currentmatrix~def~
     Resolution~72~div~VResolution~72~div~scale~
     DVImag~dup~scale~
     #1 ~
     savedmatrix~setmatrix
  }
\cs_new_protected:Npn \__driver_box_use_clip:N #1
  {
    \__driver_state_save:
    \__driver_literal:n
      {
        \__driver_absolute_lengths:n
          {
            0~
            \dim_to_decimal_in_bp:n { \box_dp:N #1 } ~
            \dim_to_decimal_in_bp:n { \box_wd:N #1 } ~
            \dim_to_decimal_in_bp:n { - \box_ht:N #1 - \box_dp:N #1 } ~
            rectclip
          }
      }
    \hbox_overlap_right:n { \box_use:N #1 }
    \__driver_state_restore:
    \skip_horizontal:n { \box_wd:N #1 }
  }
\cs_new_protected_nopar:Npn \__driver_box_rotate_begin:
  {
    \__driver_state_save:
    \fp_set:Nn \l__box_angle_fp { round ( \l__box_angle_fp , 5 ) }
    \__driver_literal:n
      {
        \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp
          { 0 }
          { \fp_eval:n { - \l__box_angle_fp } }
        \c_space_tl
        rotate
      }
  }
\cs_new_eq:NN \__driver_box_rotate_end: \__driver_state_restore:
\cs_new_protected_nopar:Npn \__driver_box_scale_begin:
  {
    \__driver_state_save:
    \fp_set:Nn \l__box_scale_x_fp { round ( \l__box_scale_x_fp , 5 ) }
    \fp_set:Nn \l__box_scale_y_fp { round ( \l__box_scale_y_fp , 5 ) }
    \__driver_literal:n
      {
        \fp_use:N \l__box_scale_x_fp \c_space_tl
        \fp_use:N \l__box_scale_y_fp \c_space_tl
        scale
      }
  }
\cs_new_eq:NN \__driver_box_scale_end: \__driver_state_restore:
\tl_new:N \l__driver_current_color_tl
\tl_set:Nn \l__driver_current_color_tl { Black }
\cs_new_protected_nopar:Npn \__driver_color_ensure_current:
  {
    \tex_special:D { color~push~\l__driver_current_color_tl }
    \group_insert_after:N \__driver_color_reset:
  }
\cs_new_protected_nopar:Npn \__driver_color_reset:
  { \tex_special:D { color~pop } }
%% 
%%
%% End of file `l3dvips.def'.
