I'm writing graphic application to generate latex tex. I'm making to generate text box with all it's features. Rotation alignment so on. I generated following cording but It was not Right aligned properly in paragrah box I have shown bounding box. What is wrong there...
\documentclass[a4paper]{article}
\usepackage{pstricks}
\usepackage{xcolor}
\usepackage[arabic,english]{babel}
\begin{document}
\textLR{
\begin{pspicture}(10, 10)
\psgrid
\definecolor{Black}{RGB}{0,0,0}
\rput{0}(3.9,7){%
\psframe[,linestyle=solid,linewidth=0.265mm,linecolor=Black](-2.1,1.9)(2.1,-1.9)
\uput{0.01cm}[320]{0}(-2.1,1.9){%
\parbox[t][3.8cm][t]{4cm}{
\color[rgb]{0,0,0}
\scriptsize
\begin{flushright}
Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline Right Aligned
\newline\end{flushright}
}
}
}
\end{pspicture}}
\end{document}
\null\hfill
to the beginning of one line and\hfill\null
to the end of another does show that everything else is centered. but why that is happening is a mystery to me.