
코드를 고려해보세요
\documentclass[a5paper,12pt,onecolumn,openany,final]{book}
\usepackage[hmargin=0.7in,vmargin=0.75in]{geometry}
\usepackage{pstricks,psvectorian}
\usepackage{color}
\usepackage{scalefnt}
% % % Compiled with Xelatex
\begin{document}
\thispagestyle{empty}
\begin{pspicture}(-5,-5)(5,12)%
\renewcommand*{\psvectorianDefaultColor}{blue}%
\psframe[fillcolor=blue,fillstyle=solid](-5,-5)(5,12) %Used with colored frame
\psframe[linecolor=blue](-5,-5)(5,12)% draws frame in black.
%top and bottom center
\large
\rput(0,3){\textbf{\scalebox{0.92}{\textcolor{white}{HOW TO MAKE THE STARS GLOW?}}}}
\rput(0,9.25){\color{white}{\huge{\textbf{*}}}}
\rput(0.03,9.25){\color{white}{\huge{\textbf{*}}}}
\rput(-2.25,5.75){\color{white}{\huge{\textbf{*}}}}
\rput(-2.25,5.75){\color{white}{\huge{\textbf{*}}}}
\rput(3.25,7){\color{white}{\huge{\textbf{*}}}}
\rput(3.25,7){\color{white}{\huge{\textbf{*}}}}
\end{pspicture}%
\end{document}
생산하는
나는 별을 만들기 위해 이중으로 각인된 별표를 사용했습니다. (더 좋은 방법이 없을까요?)
질문: 별 주위에 "빛나는" 효과를 어떻게 생성할 수 있습니까?
감사합니다.
답변1
tikz
다음은 and 를 사용하는 아이디어입니다 fadings
. \glowstar[<size>]{x,y}
a 내부에서 호출되는 명령은 tikzpicture
주어진 좌표에서 빛나는 별을 만듭니다.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{fadings, calc}
\tikzfading[name=dim fade, inner color=transparent!50, outer color=transparent!100]
\tikzfading[name=bright fade, right color=transparent!100, left color=transparent!100, middle color=transparent!0]
\newcommand{\glowstar}[2][.5]{\fill[white,path fading=dim fade](#2)circle[radius=#1*.4];
\foreach \t in {0,60,120}{
\fill[rotate around={\t:(#2)}, white,path fading=bright fade]($(#2)-(.9*#1,0)$)--($(#2)-(0,.02*#1)$)--($(#2)+(.9*#1,0)$)--($(#2)+(0,.02*#1)$)--cycle;
\fill[rotate around={\t:(#2)}, white,path fading=bright fade]($(#2)-(.3*#1,0)$)--($(#2)-(0,.04*#1)$)--($(#2)+(.3*#1,0)$)--($(#2)+(0,.04*#1)$)--cycle;}
\fill[white] (#2)circle[radius=#1*.075];
}
\begin{document}
\begin{tikzpicture}
\fill[blue] rectangle (4,2);
\glowstar[.5]{2,1}
\glowstar[.2]{1,1.5}
\glowstar[.3]{3,.5}
\end{tikzpicture}
\end{document}