I would like to declare a custom shape

\radius \pgf@xa=\pgf@x 
\centerpoint \pgf@xb=\pgf@x \pgf@yb=\pgf@y

The custom shape will inherit from circle. I have the following questions:

  1. How can I fill the circle,ellipse etc with the given color?
  2. How can I shift the center point of the first ellipse with radius/2 left and the second radius/2 right?
  • Is this a TikZ or a PGF question? Do you know of the ellipse shape from the shapes.geometric library that also includes a proper anchor border? What do you want to achieve? – Qrrbrbirlbel Oct 15 '13 at 22:55

You need to stroke or fill or shade or clip the path you have created. Here is a quick mock-up (though it's a little too quick, the path modes are really hacky. There are more proper ways of doing it. Just check the shapes library). For shifting points you can use \pgfpointadd or \pgfpointdiff etc.

\centerpoint \pgf@xb=\pgf@x \pgf@yb=\pgf@y

\node[circse,thick,draw=red,fill=yellow,scale=5] {};

enter image description here

  • 1
    Eh … The backgroundpath (and the foreground path) will be supplied with the options in \pgfnode{<shape>}{<anchor>}{<text>}{<name>}{<This will be executed after the background and the foreground path have been constructed.>}. Just do the path there and let TikZ/PGF do the rest. (It will add \begingroup\tikz@finish.) – Qrrbrbirlbel Oct 15 '13 at 22:53
  • 2
    @Qrrbrbirlbel I know it's just hack for making an example. – percusse Oct 15 '13 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.