
\documentclass[10pt]{article}

%\usepackage{pgfplots}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.text}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{patterns} % LATEX and plain TEX when using Tik Z\usetikzlibrary[patterns]
\usepackage{xepersian}
\settextfont[Scale=1.1]{XB Zar}
\setdigitfont{Yas}
\begin{document}
\begin{tikzpicture}
\draw[pattern color=red,pattern=fivepointed stars] (0,0) circle (1cm);
\draw[pattern color=blue,pattern=fivepointed stars] (0,0) rectangle (3,1);
\end{tikzpicture}
\begin{tikzpicture}
\def\mypath{(0,0) -- +(0,1) arc (180:0:1.5cm) -- +(0,-1)}
\fill [red] \mypath;
\pattern[pattern color=white,pattern=bricks] \mypath;
\end{tikzpicture}
\end{document}