Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to make the gradient color to follow the pipe curve below rather than to span from the left to the right.

The following MWE shows the default behavior which is not what I'm looking for.

\documentclass[pstricks,border=12pt]{standalone}

\usepackage{pst-slpe} 

\begin{document}

\begin{pspicture}(8,-7)
\pscustom[fillstyle=slope]{
  \psline(6,0)
  \psarcn(6,-2){2}{90}{-90}
  \psline(2,-4)
  \psarc(2,-5){1}{90}{-90}
  \psline(8,-6)
  \psline(8,-7)(2,-7)
  \psarcn(2,-5){2}{-90}{90}
  \psline(6,-3)
  \psarc(6,-2){1}{-90}{90}
  \psline(0,-1)
  \closepath}
\end{pspicture}

\end{document}

enter image description here

Could you help me to accomplish my objective?

P.S. The color should be {rgb:orange,0;black,100} at one end and {rgb:orange,80;black,20} at the other.

share|improve this question
    
@StiffJokes I don't think so (but maybe I'm using it in the wrong place). If this problem is solved, I still can't figure out how to get a smooth colour gradient throughout the entire pipe (with slopebegin = {rgb:orange,0;black,100}, slopeend = {rgb:orange,80;black,20},). –  Svend Tveskæg Dec 22 '13 at 9:08
    
@StiffJokes Yes. The black end should have the colour {rgb:orange,0;black,100} (i.e., black, as it is now) and the other end (where the pipe is coming out of the furnace and the lower right part of it) should have the colour {rgb:orange,80;black,20}. –  Svend Tveskæg Dec 22 '13 at 9:15
    
@StiffJokes I have come to the same conclusion. :) –  Svend Tveskæg Dec 22 '13 at 9:20
    
@SvendTveskæg: draw a line instead of rectangles, use the optional argument of linearc and have a look at tug.org/PSTricks/main.cgi?file=Examples/Colors/colors#contColor –  Herbert Dec 22 '13 at 9:41
    
@Herbert I have now looked at the examples on the PSTricks page and I can't really figure out how to use it. Can I make you give an answer? –  Svend Tveskæg Dec 22 '13 at 14:48
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.