\documentclass{article}
\usepackage{pstricks}
\begin{document}
\begin{pspicture}(-4,-4)(4,4)
\psframe[linewidth=1pt,framearc=0,fillstyle=hlines*,hatchsep=6pt,hatchwidth=1pt](0,0)(5,5)
\end{pspicture}
\end{document}
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
%\usepackage[xetex,active,tightpage]{preview}
\usepackage[pdftex,active,tightpage]{preview}
\PreviewEnvironment[]{tikzpicture}
\begin{document}
\begin{tikzpicture}[line width=1ex]
\draw (0,0) -- (3,1);
\filldraw [fill=red,draw opacity=0.5] (1,0) rectangle (2,1);
\end{tikzpicture}
\end{document}