The problem is that pgfcirctripoles.sty
defines the path of the shape and then draws it independently of your options, instead of just declaring the path and not using it.
If you modify the definition of the or
ports in line 498 of pgfcirctripoles.sty
as follows:
\pgfcircdeclarelogicport{or}{
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpoint
{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@up}}
\pgfpathmoveto{\pgfpoint
{\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint
{(\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}-\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input skip})*\pgf@circ@res@left}
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/input height}\pgf@circ@res@down}}
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}{0pt}}
\pgfpathlineto{\pgfpoint
{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right}
{0pt}}
%\pgfusepath{draw}
\pgf@circ@res@other=\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/port width}\pgf@circ@res@right
%\pgfsetlinewidth{2\pgflinewidth}
\pgfpathmoveto{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
\pgfpathcurveto
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@up}}
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{0pt}}
\pgfpathcurveto
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/bbb}\pgf@circ@res@left}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/aaa}\pgf@circ@res@left}{\pgf@circ@res@down}}
{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@down}}
\pgfpathcurveto
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@down}}
{\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@down}}
{\pgfpoint{\pgf@circ@res@other}{0pt}}
\pgfpathcurveto
{\pgfpoint{\pgf@circ@res@other}{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ccc}\pgf@circ@res@up}}
{\pgfpoint{\pgfkeysvalueof{/tikz/circuitikz/tripoles/american or port/ddd}\pgf@circ@res@left}{\pgf@circ@res@up}}
{\pgfpoint{-\pgf@circ@res@other}{\pgf@circ@res@up}}
%\pgfusepath{draw}
}
(which is exactly as before minus few commented lines)
you obtain that:
- the shape obeys the fill style
- you need to put an explicit
draw
style in the node of the port (i.e. (0,2) node[or port,fill=red,draw] (myor) {}
)
shapes.gates.logic.US
library, although the gates don't look as nice as the ones fromcircuitikz
, in my opinion.