Consider the code:
\documentclass{book}
\textheight 8.5in \textwidth 5.75in
\usepackage{xcolor}
%\usepackage{transparent}
\definecolor{darkpurple}{RGB}{48, 25, 52}
\usepackage{tikz}
\usetikzlibrary{fadings, calc}
\tikzfading[name=dim fade, inner color=transparent!40, outer color=transparent!100]
\tikzfading[name=bright fade, right color=transparent!100, left color=transparent!100, middle color=transparent!0]
\tikzfading[name=long bright fade, right color=transparent!100, left color=transparent!0]
\newcommand{\glowstar}[3][.5]{\fill[white,path fading=dim fade](#2)circle[radius=#1*.6];
\foreach \t in {0,60,120}{
\fill[rotate around={\t:(#2)}, white,path fading=bright fade]($(#2)-(.9*#1,0)$)--($(#2)-(0,.05*#1)$)--($(#2)+(.9*#1,0)$)--($(#2)+(0,.02*#1)$)--cycle;
\fill[rotate around={\t:(#2)}, white,path fading=long bright fade]($(#2)-(.5*#1,0)$)--($(#2)-(0,.04*#1)$)--($(#2)+(.5*#1,0)$)--($(#2)+(0,.04*#1)$)--cycle;
}
\foreach \l [count=\n from 0] in {#3}{
\fill[rotate around={\n*90:(#2)}, white,path fading=bright fade]($(#2)-(\l*#1,0)$)--($(#2)-(.4,.06*#1)$)--($(#2)+(.4,.06*#1)$)--cycle;
}
\fill[white] (#2)circle[radius=#1*.13];
}
\begin{document}
\thispagestyle{empty}
\begin{center}
\begin{tikzpicture}
\fill[darkpurple] rectangle (8,6);
\glowstar[1.8]{4,3}{1,1,1,1}% length of left,bottom,right,top
\end{tikzpicture}
\end{center}
\end{document}
which produces what I want:
However, I want to use this for a document which requires the transparent
package and compiles with pdflatex
.
But, when I run the above code with \usepackage{transparent}
, the following is produced:
QUESTION: How may I produce the first output while invoking the transparent
package and compiling with pdflatex
?
Thank you.
\usepackage{transparent}
is commented or not. What version of LaTeX are you using? When did you last update your packages?