% xhfill.sty
% 16. September 2003, v0.1 Herbert Voss
% Usage (example)
% \usepackage{xhfill}
% \xhrulefill{blue}{5pt}
% \xrfill[raise]{ruleheight}[color]
% \xhrectanglefill{<height>}{<linewidth>}
% \xhrectanglefill{1cm}{1pt}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{xhfill}[2003/07/23 v 0.1 modify width and color of hrulefill]
 \RequirePackage{color}
 \RequirePackage{calc}
 \RequirePackage{xspace}
 \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}%
}
\endinput
