-
Notifications
You must be signed in to change notification settings - Fork 0
/
mimoshapes.tex
859 lines (753 loc) · 31.1 KB
/
mimoshapes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
% chktex-file 1
% chktex-file 27
% This file defines some new node shapes to use with tikz.
%
% The start code was taken and modified from the example in
% http://www.texample.net/tikz/examples/d-flip-flops-and-shift-register/
%
% The shapes defined here are:
% - mimoone
% - mimotwo
% - mimothree
% - mimoind
% - boxtwo
% - boxthree
%
% For the three first shapes you can epecify either the "right antennas" or
% "left antennas" option to indicate the antennas position. You can also
% change some distances by specifying the options "antenna offset",
% "antenna base height" and "antenna side" with some value.
%
% For the last two shapes you can change the appearance with the "circle
% fill color", "circle stroke color" and "circle radius" options.
\makeatletter
\newif\ifleftantennas
% The keys that the user can provide are all the keys below, except
% "leftantennas" (use the "right antennas" or "left antennas" keys instead)
\pgfkeys{
/mimonode/leftantennas/.is if=leftantennas,
/pgf/.cd,
right antennas/.code={\pgfkeys{/mimonode/leftantennas=false}},
left antennas/.code={\pgfkeys{/mimonode/leftantennas=true}},
% minimum width/.initial=1.5cm,
% minimum height/.initial=2cm,
circle fill color/.initial=white,
circle stroke color/.initial=black,
circle radius/.initial=2mm,
antenna offset/.initial=0.3cm,
antenna yshift/.initial=0.cm,
antenna base height/.initial=0.2 cm,
antenna side/.initial=0.4cm,
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx Macro definitions xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% Macro with the common code to draw an antenna. Before calling this macro
% (inside the backgroundpath or similar) you need to set the values of
% \pgf@x and \pgf@y to point to the start of the antenna.
\def\mimoshapesdrawantenna{
% Store the current positions in \pgf@xa and \pgf@ya
\pgf@xa=\pgf@x
\pgf@ya=\pgf@y
\pgfpathmoveto{\pgfpoint{\pgf@x}{\pgf@y}}
\advance\pgf@xa by \antennaoffset
\pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}}
\pgfpathclose
\pgfmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}}
% \pgf@xb and \pgf@yb will have the coordinate with the starting point to
% draw the triangle
\pgf@xb=\pgf@xa \pgf@yb=\pgf@ya
\advance\pgf@yb by \antennabaseheight cm
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
% See section "Internals of How Point Commands Work" of the pgf manual to
% understand pgf@process
\pgf@process{
\pgfpointadd{\pgfpoint{\pgf@xb}{\pgf@yb}}{\pgfpointpolar{60}{\pgfkeysvalueof{/pgf/antenna side}}}
}
\pgf@xc=\pgf@x
\pgf@yc=\pgf@y
\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}
\pgf@process{
\pgfpointadd{\pgfpoint{\pgf@xc}{\pgf@yc}}{\pgfpointpolar{180}{\pgfkeysvalueof{/pgf/antenna side}}}
}
\pgfpathlineto{\pgfpoint{\pgf@x}{\pgf@y}}
\pgf@process{
\pgfpointadd{\pgfpoint{\pgf@xb}{\pgf@yb}}{\pgfpointpolar{240}{\pgfkeysvalueof{/pgf/antenna side}}}
}
\pgfpathlineto{\pgfpoint{\pgf@xb}{\pgf@yb}}
}
% Macro with the common code to draw the ellipses. Before calling this
% macro (inside the backgroundpath or similar) you need to set the values
% of \pgf@x and \pgf@y to point to the center of the ellipses.
\def\drawellipses{
% Store the current positions in \pgf@xa and \pgf@ya
\pgf@xa=\pgf@x
\advance\pgf@xa by \antennaoffset
\pgf@ya=\pgf@y
% See section "Internals of How Point Commands Work" of the pgf manual to
% understand pgf@process
\pgf@process{\pgfpathcircle{\pgfpoint{\pgf@xa}{\pgf@ya+\antennabaseheight-1pt}}{1pt}}
\pgf@process{\pgfpathcircle{\pgfpoint{\pgf@xa}{\pgf@ya+\antennabaseheight+2pt}}{1pt}}
\pgf@process{\pgfpathcircle{\pgfpoint{\pgf@xa}{\pgf@ya+\antennabaseheight+5pt}}{1pt}}
}
% The code to determine the x coordinate for the anchors in the start of
% each antenna is common for all antennas. Therefore, it is better to
% define a macro with it and just call the macro when define the respective
% savedanchor.
\def\antennaStartXCoordinate{
% x position
\ifleftantennas
% Anchor position when the "left antennas" key is used
\pgf@x=-.5\wd\pgfnodeparttextbox
% Advance by the inner xsep
\pgfmathsetlength\pgf@xc{-\pgfkeysvalueof{/pgf/inner xsep}}
\advance\pgf@x by \pgf@xc%
%
% If the resulting x coordinate is lower the value required for the
% minimum width then the value for the minimum width will be used instead
\setlength{\pgf@xa}{-\pgfshapeminwidth}
\ifdim\pgf@x>.5\pgf@xa
\pgf@x=.5\pgf@xa
\fi
\else
% Anchor position when the "left antennas" key is not used or when
% the "right antennas" key is used.
\pgf@x=.5\wd\pgfnodeparttextbox % width of the box
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}
\advance\pgf@x by \pgf@xc%
\setlength{\pgf@xa}{\pgfshapeminwidth}
\ifdim\pgf@x<.5\pgf@xa
\pgf@x=.5\pgf@xa
\fi
\fi
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx mimoone shape declaration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{mimoone}{
% xxxxxxxxxx First we define some savedmacros xxxxxxxxxxxxxxxxxxxxxxxxxxx
\savedmacro\antennaoffset{
\ifleftantennas
\def\antennaoffset{-\pgfkeysvalueof{/pgf/antenna offset}}
\else
\def\antennaoffset{\pgfkeysvalueof{/pgf/antenna offset}}
\fi
}
\savedmacro\antennabaseheight{
\def\antennabaseheight{\pgfkeysvalueof{/pgf/antenna base height}}
}
\savedmacro\antennayshift{
\def\antennayshift{\pgfkeysvalueof{/pgf/antenna yshift}}
}
\savedmacro\shapewidth{
\def\shapewidth{\pgfkeysvalueof{/pgf/minimum width}}
}
\savedmacro\shapeheight{
\def\shapeheight{\pgfkeysvalueof{/pgf/minimum height}}
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define the savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\savedanchor\northeast{%
\pgf@y=.5\ht\pgfnodeparttextbox % height of the box, ignoring the depth
\pgf@x=.5\wd\pgfnodeparttextbox % width of the box
%
% -----> Take the inner sep into account
\pgfmathsetlength\pgf@xc{\pgfkeysvalueof{/pgf/inner xsep}}
\advance\pgf@x by \pgf@xc%
\pgfmathsetlength\pgf@yc{\pgfkeysvalueof{/pgf/inner ysep}}
\advance\pgf@y by \pgf@yc%
% -----
% Test if the minimum width and height are respected. If not, set it as
% the minimum width/height.
\setlength{\pgf@xa}{\shapewidth}
\ifdim\pgf@x<.5\pgf@xa
\pgf@x=.5\pgf@xa
\fi
\setlength{\pgf@ya}{\shapeheight}
\ifdim\pgf@y<.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
%
% -----> Take the outer sep into account
% Now that we have the values of x and y we could stop here. However,
% in order to take into account the "outer sep" we need to add it to
% the anchor position(the idea is that the anchor will be outside the
% actual node (by the outer sep ammount). The default value of the
% outer sep is half the length of a line. Note that we are including
% the outer sep value in the anchor definition, but it should not be
% taken into account when drawing the background. Therefore, we need to
% remove this when drawing the rectangle box.
\pgfmathsetlength\pgf@xa{\pgfkeysvalueof{/pgf/outer xsep}}%
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@ya{\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@y by\pgf@ya%
}
\savedanchor\southwest{%
\pgf@y=-.5\ht\pgfnodeparttextbox % height of the box, ignoring the depth
\pgf@x=-.5\wd\pgfnodeparttextbox % width of the box
%
% -----> Take the inner sep into account
\pgfmathsetlength\pgf@xc{-\pgfkeysvalueof{/pgf/inner xsep}}
\advance\pgf@x by \pgf@xc%
\pgfmathsetlength\pgf@yc{-\pgfkeysvalueof{/pgf/inner ysep}}
\advance\pgf@y by \pgf@yc%
%
% Test if the minimum width and height are respected. If not, set it as
% the minimum width/height.
\setlength{\pgf@xa}{-\shapewidth}
\ifdim\pgf@x>.5\pgf@xa
\pgf@x=.5\pgf@xa
\fi
\setlength{\pgf@ya}{-\shapeheight}
\ifdim\pgf@y>.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
%
% -----> Take the outer sep into account (see comment in the northeast savedanchor)
\pgfmathsetlength\pgf@xa{-\pgfkeysvalueof{/pgf/outer xsep}}%
\advance\pgf@x by\pgf@xa%
\pgfmathsetlength\pgf@ya{-\pgfkeysvalueof{/pgf/outer ysep}}%
\advance\pgf@y by\pgf@ya%
}
% This anchor position will depend if the "left antennas" option was
% passed or not.
\savedanchor{\anchorA}{
% -----> y position for the first antenna
\pgf@y=.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{\pgfshapeminheight}
\ifdim\pgf@y<.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@y=0.\pgf@y
\advance\pgf@y by \antennayshift
%
% -----> x position
\antennaStartXCoordinate
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from rectangle xxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=rectangle]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from rectangle xxxxxxxxxxxxxxxxxxxxxx
% We can inherit the "usual" from rectangle. They depend on the
% "\southwest" and "\northeast" savedanchors but this will use our
% version instead of the rectangle's version.
\inheritanchor[from=rectangle]{center}
\inheritanchor[from=rectangle]{north}
\inheritanchor[from=rectangle]{east}
\inheritanchor[from=rectangle]{south}
\inheritanchor[from=rectangle]{west}
\inheritanchor[from=rectangle]{north east}
\inheritanchor[from=rectangle]{north west}
\inheritanchor[from=rectangle]{south west}
\inheritanchor[from=rectangle]{south east}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define more regular anchors xxxxxxxxxxxxxxxxxxxxxxxxx
\anchor{A}{
\pgf@process{\anchorA}
}
\anchor{text}
{
\pgf@process{\pgfpointorigin}
\advance\pgf@x by -.5\wd\pgfnodeparttextbox%
\advance\pgf@y by -.5\ht\pgfnodeparttextbox%
\advance\pgf@y by +.5\dp\pgfnodeparttextbox%
}
% -----> Define some more useful anchors
\anchor{first antenna base start}{
\pgf@process{\anchorA}
}
\anchor{first antenna base end}{
\pgf@process{\anchorA}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.2cm%
}
\anchor{first antenna}{
%\csname pgf@anchor@mimoone@first antenna base start\endcsname
\pgf@process{\anchorA}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.4cm%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
% \pgfpathrectanglecorners{\southwest}{\northeast}
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
%%%%%%% Draw the first antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorA}
% The mimoshapesdrawantenna command only needs that the pgf@x and pgf@y
% variables are correctly set. This is done by calling the anchor A
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx End of mimoone shape declaration xxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx mimotwo shape declaration xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{mimotwo}{
% xxxxxxxxxx Define savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we Inherit savedanchors (and savedmacro's) from mimoone
\inheritsavedanchors[from=mimoone]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define some savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we redefine the "anchorA", since it will be different from the
% one we inherited from the mimoone shape.
%
% This anchor position will depend if the "left antennas" option was
% passed or not.
\savedanchor{\anchorA}{
% -----> y position for the first antenna
\pgf@y=.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{\pgfshapeminheight}
\ifdim\pgf@y<.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@y=0.4\pgf@y
\advance\pgf@y by \antennayshift
%
% -----> x position
\antennaStartXCoordinate
}
% Now we define a new anchorB for the second antenna.
% This anchor position will depend if the "left antennas" option was
% passed or not
\savedanchor{\anchorB}{
% -----> y position for the first antenna
\pgf@y=-.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{-\pgfshapeminheight}
\ifdim\pgf@y>.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@y=0.6\pgf@y
\advance\pgf@y by \antennayshift
%
% -----> x position
\antennaStartXCoordinate
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from mimoone xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=mimoone]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from mimoone xxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchor[from=mimoone]{center}
\inheritanchor[from=mimoone]{north}
\inheritanchor[from=mimoone]{east}
\inheritanchor[from=mimoone]{south}
\inheritanchor[from=mimoone]{west}
\inheritanchor[from=mimoone]{north east}
\inheritanchor[from=mimoone]{north west}
\inheritanchor[from=mimoone]{south west}
\inheritanchor[from=mimoone]{south east}
\inheritanchor[from=mimoone]{text}
\inheritanchor[from=mimoone]{A}
\inheritanchor[from=mimoone]{first antenna base start}
\inheritanchor[from=mimoone]{first antenna base end}
\inheritanchor[from=mimoone]{first antenna}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define more regular anchors xxxxxxxxxxxxxxxxxxxxxxxxx
\anchor{B}{
\pgf@process{\anchorB}
}
\anchor{second antenna base start}{
\pgf@process{\anchorB}
}
\anchor{second antenna base end}{
\pgf@process{\anchorB}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.2cm%
}
\anchor{second antenna}{
%\csname pgf@anchor@mimotwo@second antenna base start\endcsname
\pgf@process{\anchorB}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.4cm%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
% \pgfpathrectanglecorners{\southwest}{\northeast}
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
%%%%%%% Draw the first antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorA}
% The mimoshapesdrawantenna command only needs that the pgf@x and pgf@y
% variables are correctly set. This is done by calling the anchor A
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Draw the second antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorB}
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx End of mimotwo shape declaration xxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxx Mimo Shape with three antennas xxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{mimothree}{
% xxxxxxxxxx Define savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we Inherit savedanchors (and savedmacro's) from mimotwo
\inheritsavedanchors[from=mimotwo]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define some savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we redefine "anchorA" and "anchorB", since they will be different
% from the one we inherited from the mimotwo shape.
%
% This anchor position will depend if the "left antennas" option was
% passed or not.
\savedanchor{\anchorA}{
\pgf@y=.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{\pgfshapeminheight}
\ifdim\pgf@y<.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@y=0.5\pgf@y
\advance\pgf@y by \antennayshift
%
% -----> x position
\antennaStartXCoordinate
}
\savedanchor{\anchorC}{
% y position for the first antenna
\pgf@y=-.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{-\pgfshapeminheight}
\ifdim\pgf@y>.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@y=0.9\pgf@y
\advance\pgf@y by \antennayshift
%
% -----> x position
\antennaStartXCoordinate
}
% B is in the middle of A and C
\savedanchor{\anchorB}{
% y position
% First we get y position of anchor A
\pgf@y=.5\ht\pgfnodeparttextbox
\setlength{\pgf@ya}{\pgfshapeminheight}
\ifdim\pgf@y<.5\pgf@ya
\pgf@y=.5\pgf@ya
\fi
\pgf@ya=0.5\pgf@y
% Then we get y position of anchor C
\pgf@y=-.5\ht\pgfnodeparttextbox
\setlength{\pgf@yc}{-\pgfshapeminheight}
\ifdim\pgf@y>.5\pgf@yc
\pgf@y=.5\pgf@yc
\fi
\pgf@yc=0.9\pgf@y
% y position of anchor B is in the middle of anchor A and C
\pgf@y=0.5\pgf@yc
\advance\pgf@y by 0.5\pgf@ya
%
\advance\pgf@y by \antennayshift
%
% x position
\antennaStartXCoordinate
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from mimotwo xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=mimotwo]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from mimotwo xxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchor[from=mimotwo]{center}
\inheritanchor[from=mimotwo]{north}
\inheritanchor[from=mimotwo]{east}
\inheritanchor[from=mimotwo]{south}
\inheritanchor[from=mimotwo]{west}
\inheritanchor[from=mimotwo]{north east}
\inheritanchor[from=mimotwo]{north west}
\inheritanchor[from=mimotwo]{south west}
\inheritanchor[from=mimotwo]{south east}
\inheritanchor[from=mimotwo]{text}
\inheritanchor[from=mimotwo]{A}
\inheritanchor[from=mimotwo]{B}
\inheritanchor[from=mimotwo]{first antenna base start}
\inheritanchor[from=mimotwo]{second antenna base start}
\inheritanchor[from=mimotwo]{first antenna base end}
\inheritanchor[from=mimotwo]{second antenna base end}
\inheritanchor[from=mimotwo]{first antenna}
\inheritanchor[from=mimotwo]{second antenna}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define more regular anchors xxxxxxxxxxxxxxxxxxxxxxxxx
\anchor{C}{\anchorC}
\anchor{third antenna base start}{
\pgf@process{\anchorC}
}
\anchor{third antenna base end}{
\pgf@process{\anchorC}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.2cm%
}
\anchor{third antenna}{
%\csname pgf@anchor@mimothree@third antenna base start\endcsname
\pgf@process{\anchorC}
\advance\pgf@x by \antennaoffset%
\advance\pgf@y by 0.4cm%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
%%%%%%% Draw the first antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorA}
% The mimoshapesdrawantenna command only needs that the pgf@x and pgf@y
% variables are correctly set. This is done by calling the anchor A
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Draw the second antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorB}
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Draw the third %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorC}
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx End of mimothree shape declaration xxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxx Mimo Shape with "many" antennas xxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{mimoind}{
% xxxxxxxxxx Define savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we Inherit savedanchors (and savedmacro's) from mimothree
\inheritsavedanchors[from=mimothree]
% There is no need to define more savedanchors, since mimothree already
% provide us with all we need.
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from mimotwo xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=mimothree]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from mimothree xxxxxxxxxxxxxxxxxxxxxx
\inheritanchor[from=mimothree]{center}
\inheritanchor[from=mimothree]{north}
\inheritanchor[from=mimothree]{east}
\inheritanchor[from=mimothree]{south}
\inheritanchor[from=mimothree]{west}
\inheritanchor[from=mimothree]{north east}
\inheritanchor[from=mimothree]{north west}
\inheritanchor[from=mimothree]{south west}
\inheritanchor[from=mimothree]{south east}
\inheritanchor[from=mimothree]{text}
\inheritanchor[from=mimothree]{A}
\inheritanchor[from=mimothree]{B}
\inheritanchor[from=mimothree]{C}
\inheritanchor[from=mimothree]{first antenna base start}
\inheritanchor[from=mimothree]{second antenna base start}
\inheritanchor[from=mimothree]{third antenna base start}
\inheritanchor[from=mimothree]{first antenna base end}
\inheritanchor[from=mimothree]{second antenna base end}
\inheritanchor[from=mimothree]{third antenna base end}
\inheritanchor[from=mimothree]{first antenna}
\inheritanchor[from=mimothree]{second antenna}
\inheritanchor[from=mimothree]{third antenna}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
%%%%%%% Draw the first antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Você pode usar \pgf@anchor@SHAPE_NAME@ANCHOR_NAME para mudar o \pgf@x
% e o \pgf@y para as coordenadas de uma âncora. Só que se você resolver
% mudar o nome do shape depois vai ter que mudar todas as linhas que
% contem o SHAPE_NAME. Melhor usar o csname como na linha abaixo.
\pgf@process{\anchorA}
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Draw the second antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\csname pgf@anchor@\pgf@sm@shape@name @second antenna base end\endcsname
\pgf@process{\anchorB}
%\mimoshapesdrawantenna
\drawellipses
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Draw the third antenna %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgf@process{\anchorC}
\mimoshapesdrawantenna
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx End of mimoind shape declaration xxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxx Boxtwo Node xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{boxtwo}{
% xxxxxxxxxx Define savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we Inherit savedanchors (and savedmacro's) from mimoone
\inheritsavedanchors[from=mimoone]
% There is no need to define more savedanchors, since mimoone already
% provide us with all we need.
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from mimotwo xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=mimoone]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from mimoone xxxxxxxxxxxxxxxxxxxxxx
\inheritanchor[from=mimotwo]{center}
\inheritanchor[from=mimotwo]{north}
\inheritanchor[from=mimotwo]{east}
\inheritanchor[from=mimotwo]{south}
\inheritanchor[from=mimotwo]{west}
\inheritanchor[from=mimotwo]{north east}
\inheritanchor[from=mimotwo]{north west}
\inheritanchor[from=mimotwo]{south west}
\inheritanchor[from=mimotwo]{south east}
\inheritanchor[from=mimotwo]{text}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define more regular anchors xxxxxxxxxxxxxxxxxxxxxxxxx
% See section "Internals of How Point Commands Work" of the pgf manual to
% understand pgf@process
\anchor{A}{
\pgf@process{\northeast}%
\pgf@x=0pt
\pgf@y=0.5\pgf@y%
}
\anchor{B}{
\pgf@process{\northeast}%
\pgf@x=0pt
\pgf@y=-0.5\pgf@y%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
{
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
\pgfusepath{stroke,fill}
}
% The two circles
{
\csname pgf@anchor@\pgf@sm@shape@name @A\endcsname
\pgfcircle{\pgfpoint{\pgf@x}\pgf@y{}}{\pgfkeysvalueof{/pgf/circle radius}}
\csname pgf@anchor@\pgf@sm@shape@name @B\endcsname
\pgfcircle{\pgfpoint{\pgf@x}\pgf@y{}}{\pgfkeysvalueof{/pgf/circle radius}}
\pgfsetfillcolor{\pgfkeysvalueof{/pgf/circle fill color}}
\pgfsetstrokecolor{\pgfkeysvalueof{/pgf/circle stroke color}}
\pgfusepath{stroke,fill}
}
}
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxx End of boxtwo shape declaration xxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxx Boxthree Node xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
%% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\pgfdeclareshape{boxthree}{
% xxxxxxxxxx Define savedanchors xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% First we Inherit savedanchors (and savedmacro's) from mimoone
\inheritsavedanchors[from=boxtwo]
% There is no need to define more savedanchors, since mimoone already
% provide us with all we need.
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit anchor border from mimotwo xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchorborder[from=boxtwo]
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Inherit normal anchors from boxtwo xxxxxxxxxxxxxxxxxxxxxxxxx
\inheritanchor[from=boxtwo]{center}
\inheritanchor[from=boxtwo]{north}
\inheritanchor[from=boxtwo]{east}
\inheritanchor[from=boxtwo]{south}
\inheritanchor[from=boxtwo]{west}
\inheritanchor[from=boxtwo]{north east}
\inheritanchor[from=boxtwo]{north west}
\inheritanchor[from=boxtwo]{south west}
\inheritanchor[from=boxtwo]{south east}
\inheritanchor[from=boxtwo]{text}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Now we define more regular anchors xxxxxxxxxxxxxxxxxxxxxxxxx
% See section "Internals of How Point Commands Work" of the pgf manual to
% understand pgf@process
\anchor{A}{
\northeast
\pgf@x=0pt
\pgf@y=0.6\pgf@y%
}
\anchor{B}{
\pgf@x=0pt
\pgf@y=0pt
}
\anchor{C}{
\northeast
\pgf@x=0pt
\pgf@y=-0.6\pgf@y%
}
% xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
% xxxxxxxxxx Draw the background xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\backgroundpath{
% Rectangle box
{
\pgfpathrectanglecorners
{ % First corner of the rectangle
\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}
}
{ % Second corner of the rectangle
\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}
}
\pgfusepath{stroke,fill}
}
% The three circles
{
\csname pgf@anchor@\pgf@sm@shape@name @A\endcsname
\pgfcircle{\pgfpoint{\pgf@x}\pgf@y{}}{\pgfkeysvalueof{/pgf/circle radius}}
\csname pgf@anchor@\pgf@sm@shape@name @B\endcsname
\pgfcircle{\pgfpoint{\pgf@x}\pgf@y{}}{\pgfkeysvalueof{/pgf/circle radius}}
\csname pgf@anchor@\pgf@sm@shape@name @C\endcsname
\pgfcircle{\pgfpoint{\pgf@x}\pgf@y{}}{\pgfkeysvalueof{/pgf/circle radius}}
\pgfsetfillcolor{\pgfkeysvalueof{/pgf/circle fill color}}
\pgfsetstrokecolor{\pgfkeysvalueof{/pgf/circle stroke color}}
\pgfusepath{stroke,fill}
}
}
}
\makeatother
% The Comment below is only important for Emacs
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "testmimoshapes.tex"
%%% TeX-PDF-mode: t
%%% End: