%% $Id: xhfill.sty 500 2011-05-14 09:39:57Z herbert $
%%
%% This is file `xhfill.sty',
%%
%% IMPORTANT NOTICE:
%%
%% Package `xhfill'
%%
%% Herbert Voss <hvoss _at_ tug.org>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `xhfill' is a package for extended hfillrules
%%
%% Usage
%% \xhrulefill{blue}{5pt}
%% \xrfill[raise]{ruleheight}[color]
%% \xhrectanglefill{<height>}{<linewidth>}
%% \xhrectanglefill{1cm}{1pt}
%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{xcolor}
\RequirePackage{calc}
\RequirePackage{xspace}
\def\fileversion{1.01}
\def\filedate{2011/05/14}

\ProvidesPackage{xhfill}[\filedate\ v \fileversion\ modify width and color of hrulefill]
%
\providecommand{\xhrulefill}[2]{%
    \leavevmode\color{#1}\leaders\hrule height #2%
    \hfill\color{black}\xspace}
%
\providecommand{\xhrectanglefill}[2]{%
  \rule{#2}{#1}\kern-#2\kern.1pt%
  \cleaders
  \hbox to 1pt{%
	\hss
	\rlap{\rule{1.2pt}{#2}}%
	\raisebox{#1-#2}{\rule{1.2pt}{#2}}%
	\hss
  }\hfill\kern.1pt\kern-#2\rule{#2}{#1}%
  \xspace%
}
\def\xrfill{\@ifnextchar[{\@xrfilli}{\@xrfilli[1ex]}}
\def\@xrfilli[#1]#2{%
  \@ifnextchar[{\@xrfillii[#1]{#2}}{\@xrfillii[#1]{#2}[black]}}
\def\@xrfillii[#1]#2[#3]{%
  \leaders
  \hbox{\raisebox{#1}{\color{#3}\rule{1.2pt}{#2}}}\hfill%
  \color{black}}
%
\def\xdotfill{\@ifnextchar[{\@xdotfilli}{\@xdotfilli[0.5ex]}}
\def\@xdotfilli[#1]#2{%
  \@ifnextchar[{\@xdotfillii[#1]{#2}}{\@xdotfillii[#1]{#2}[black]}}
\def\@xdotfillii[#1]#2[#3]{%
  \xleaders
  \hbox{\raisebox{#1}{\color{#3}\rule{1.2pt}{#2}\kern1.2pt}}\hfill%
  \color{black}}

\endinput
