From 4acee1a3ab0aae587d4f0a4327141056ee7e6081 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Sat, 23 Apr 2022 03:00:42 +0000
Subject: CTAN sync 202204230300

---
 .../contrib/circuitikz/tex/pgfcircmultipoles.tex   | 28 +++++++++++++---------
 1 file changed, 17 insertions(+), 11 deletions(-)

(limited to 'graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex')

diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
index a53bbe03f2..5ebf59cbde 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircmultipoles.tex
@@ -205,7 +205,7 @@
     \anchor{south}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
     \anchor{west}{\northwest\pgf@y=0pt }
     % start drawing
-    \backgroundpath{%
+    \pgf@circ@draw@component{%
         \northwest
         \pgf@circ@res@up = \pgf@y
         \pgf@circ@res@down = -\pgf@y
@@ -224,7 +224,7 @@
             \pgfpatharc{0}{180}{0.2*\pgf@circ@res@left}
         \fi
         \pgfusepath{stroke}%
-        \pgfsetcolor{\ctikzvalof{color}}
+        \pgf@circ@setcolor
         % Adding the pin number
         \ifpgf@circuit@chip@shownumbers
             \pgf@circ@count@a=\numpins\relax
@@ -239,6 +239,7 @@
                 \pgfmathsetmacro{\quadrant}{0}
             \fi
             \def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax}
+            \pgfscope\pgf@circ@text@strokecolor
             \def\mytext{\ctikzvalof{multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space}
             \pgfmathloop%
             \ifnum\pgf@circ@count@a>0
@@ -289,6 +290,7 @@
                 \fi
                 \advance\pgf@circ@count@a-1\relax%
                 \repeatpgfmathloop
+                \endpgfscope % for color of text
             \fi
             \endpgfscope
             % draw external pins or pads
@@ -438,7 +440,7 @@
     \anchor{south}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
     \anchor{west}{\northwest\pgf@y=0pt }
     % start drawing
-    \backgroundpath{%
+    \pgf@circ@draw@component{%
         \northwest
         \pgf@circ@res@up = \pgf@y
         \pgf@circ@res@down = -\pgf@y
@@ -463,7 +465,7 @@
         \pgfpathclose
         \pgf@circ@draworfill
         % Adding the pin number
-        \pgfsetcolor{\ctikzvalof{color}}
+        \pgf@circ@setcolor
         \ifpgf@circuit@chip@shownumbers
             \pgf@circ@count@a=\numpins%
             \divide\pgf@circ@count@a by 4 \pgf@circ@count@b=\pgf@circ@count@a
@@ -478,6 +480,7 @@
             \fi
             \def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax}
             \def\mytext{\ctikzvalof{multipoles/font}\space\pgf@circ@strut\the\pgf@circ@count@c\space}
+            \pgfscope\pgf@circ@text@strokecolor
             \pgfmathloop%
             \ifnum\pgf@circ@count@a>0
                 \ifcase\quadrant % rotation 0
@@ -567,6 +570,7 @@
                 \fi
                 \advance\pgf@circ@count@a-1\relax%
                 \repeatpgfmathloop
+                \endpgfscope % for the text labels
             \fi
             \endpgfscope
             \ifdim\pgf@circ@res@other>0pt
@@ -801,8 +805,8 @@
     \anchor{ext north west}{ \extnorthwest \advance\pgf@x by -\width}
     \anchor{ext south east}{ \extnorthwest \pgf@x=-\pgf@x \pgf@y=-\pgf@y \advance\pgf@x by -\width}
 
-    \backgroundpath{
-        \pgfsetcolor{\ctikzvalof{color}}
+    \pgf@circ@draw@component{
+        \pgf@circ@setcolor
         \pgf@circ@res@right = \width
         \pgf@circ@res@left = -\width
 
@@ -1045,7 +1049,7 @@
     \anchor{f}{\topright\pgf@x=-\pgf@x\pgf@y=0.5\pgf@y}
     \anchor{g}{\pgfpointorigin}
     \anchor{dot}{\topright\pgf@y=-\pgf@y\advance\pgf@x by \dotspace}
-    \behindbackgroundpath{%
+    \pgf@circ@draw@component{%
         \southwest % I do not want the dot here, it will stick out
         \pgf@circ@res@up = -\pgf@y
         \pgf@circ@res@down = \pgf@y
@@ -1053,7 +1057,7 @@
         \pgf@circ@res@left = -\pgf@x
         \pgfscope
         \pgf@circ@setlinewidth{multipoles}{\pgflinewidth}
-        \pgfsetcolor{\ctikzvalof{color}}
+        \pgf@circ@setcolor
         \pgfpathrectanglecorners%
         {\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
         {\pgfpoint{\pgf@circ@res@left+\dotspace}{\pgf@circ@res@up}}
@@ -1313,7 +1317,7 @@
     \anchor{bup}{\northwest\pgf@x=0pt }
     \anchor{bdown}{\northwest\pgf@x=0pt\pgf@y=-\pgf@y}
     % start drawing
-    \backgroundpath{%
+    \pgf@circ@draw@component{%
         \northwest
         \pgf@circ@res@up = \pgf@y
         \pgf@circ@res@down = -\pgf@y
@@ -1322,7 +1326,7 @@
         \pgf@circ@scaled@Rlen=\scaledRlen
         \pgf@circ@res@step = \ctikzvalof{multipoles/flipflop/pin spacing}\pgf@circ@scaled@Rlen
         \pgf@circ@res@other = \ctikzvalof{multipoles/external pins width}\pgf@circ@scaled@Rlen
-        \pgfsetcolor{\ctikzvalof{color}}
+        \pgf@circ@setcolor
         \pgfscope% (for the line width)
             \pgf@circ@setlinewidth{multipoles}{\pgflinewidth}
             \pgfpathrectanglecorners{\pgfpoint{-\width/2}{-\height/2}}{\pgfpoint{\width/2}{\height/2}}%
@@ -1342,6 +1346,7 @@
             \pgfmathsetmacro{\quadrant}{0}
         \fi
         \def\pgf@circ@strut{\vrule width 0pt height 1em depth 0.4em\relax}
+        \pgfscope\pgf@circ@text@strokecolor
         % text
         \def\mytext{\ctikzvalof{multipoles/flipflop/font}\space
                 \ctikzvalof{multipoles/flipflop/t\the\pgf@circ@count@c}%
@@ -1448,6 +1453,7 @@
                     at=\pgfpoint{0pt}{\pgf@circ@res@down+\pgf@circ@res@temp},
                     rotate=\rot]{\mytext}
             \fi
+            \endpgfscope % for text labels
             % external pins
             \ifdim\pgf@circ@res@other>0pt
             \pgfscope
@@ -1788,7 +1794,7 @@
         \pgf@y=-.5\ht\pgfnodeparttextbox%
         \advance\pgf@y by+.5\dp\pgfnodeparttextbox%
     }%
-    \backgroundpath{%
+    \pgf@circ@draw@component{%
         \topleft
         \pgf@circ@res@up = \pgf@y
         \pgf@circ@res@down = -\pgf@y
-- 
cgit v1.2.3

