# How to fill a region bounded by a character and a graphic object with a color?

There are 5 white regions bounded by the ellipse and character R as shown in the following figure.

I want to fill EACH of these regions with a UNIQUE/DIFFERENT/DISTINGUISHABLE color.

How to do this in either PSTricks or TikZ?

\documentclass[border=0pt]{standalone}

\usepackage{pstricks}

\begin{document}
\begin{pspicture}[showgrid=false](4,6)
\begin{psclip}{\psellipse[linestyle=none](2,3)(2,3)}
\rput(2,3){\psscalebox{21}{R}}
\end{psclip}
\psellipse(2,3)(2,3)
\end{pspicture}
\end{document}

1. Please don't suggest me to replace the character border with a new object by tracing it such as using \pscurve, \psbezier, or the like.

2. Please don't suggest me to use a tool provided by vector or raster graphics editors as shown in the following screenshot.

-
Can you provide a TikZ version as well? –  Jake Jul 20 '12 at 12:06
Do you want a solution for this specific R clipped by this ellipse? Or do you want a solution for any character from any font clipped by any closed curve? –  Paul Gaborit Jul 20 '12 at 12:18
@HiggsBoson: So, use Inkscape with Latin Modern font to produce this particular case and to fill each of these five regions. –  Paul Gaborit Jul 20 '12 at 12:24
Do you want different colors for each region? Or the same in all? –  egreg Jul 20 '12 at 13:27
Do you have an actual application where you need this, or is it a purely academic question? –  Jake Jul 20 '12 at 15:01

You need to use a grid

  \draw[help lines,step=.2] (-1.4,-2) grid (1.4,2);


To get

 \documentclass[11pt]{scrartcl}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\begin{scope}
\draw[ultra thick] (0,0) ellipse[ x radius=1.2cm,y radius=2cm]  ;
\clip (0,0) ellipse [x radius=1.2cm,y radius=2cm]  ;
\fill[green] (0,0) ellipse [x radius=1.2cm,y radius=2cm]  ;
\fill[orange] (-1.4,-2) rectangle (-0.8,2);
\fill[blue] (-1.4,1.5) -- (0.2,1.5) -- (1.2,0.8) -- (1.2,2) --(-1.2,2) -- cycle;
\fill[yellow] (-0.75,1.5) -- (0.2,1.5) -- (0.8,1) -- (0.6,0.2) --(0.2,0) -- (-0.75,0) -- cycle;
\fill[magenta] (0.8,1) -- (0.6,0.2) --(0.2,0) -- (0.8,-0.8) -- (0.8,-1.4) -- (1.4,-1.4) -- (1.4,1) --cycle;
\node[scale=12,inner sep=0pt] {R};
\end{scope}
% \draw[help lines,step=.2] (-1.4,-2) grid (1.4,2);
\end{tikzpicture}
\end{document}


With the grid it's easy to define the five areas:

-
Hmm, sorry I didn't see your answer for one hour. I was too busy with painting apparently. –  percusse Jul 20 '12 at 14:28
@HiggsBoson No I extract the points with the grid –  Alain Matthes Jul 20 '12 at 14:32
@percusse I delete my answer during some minutes because I used only one color. I was busy like you with painting ! :) –  Alain Matthes Jul 20 '12 at 14:34
I don't know but I'm not very optimistic –  Alain Matthes Jul 20 '12 at 15:06
@HiggsBoson You get a problem because you forgot [11pt]You need to use \documentclass[11pt]{standalone}. –  Alain Matthes Jul 20 '12 at 16:19