% Copyright 2018 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\ProvidesFileRCS{pgflibraryplotmarks.code.tex}


% A stroked circle mark

\pgfdeclareplotmark{o}
{%
  \pgfpathellipse{\pgfpointorigin}{\pgfqpoint{\pgfplotmarksize}{0sp}}{\pgfqpoint{0sp}{\pgfplotmarksize}}%
  \pgfusepathqstroke
}%


% A Mercedes-line star

\pgfdeclareplotmark{Mercedes star}
{%
  \pgfpathmoveto{\pgfqpointpolar{90}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfpathmoveto{\pgfqpointpolar{-30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfpathmoveto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfusepathqstroke
}%

\pgfdeclareplotmark{Mercedes star flipped}
{%
  \pgfpathmoveto{\pgfqpointpolar{-90}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfpathmoveto{\pgfqpointpolar{30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfpathmoveto{\pgfqpointpolar{150}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfpointorigin}%
  \pgfusepathqstroke
}%




% A six-pointed star mark

\pgfdeclareplotmark{asterisk}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{210}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{-30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-210}{\pgfplotmarksize}}%
  \pgfusepathqstroke
}%


% A five-pointed star mark

\pgfdeclareplotmark{star}
{%
  \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfpointorigin}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
  \pgfusepathqstroke
}%


% An 10-pointed star mark

\pgfdeclareplotmark{10-pointed star}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{18}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{-54}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{234}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpointpolar{162}{-\pgfplotmarksize}}\pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
  \pgfusepathqstroke
}%


% An \oplus mark

\pgfdeclareplotmark{oplus}
{%
  \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}%
  \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfusepathqstroke
}%

\pgfdeclareplotmark{oplus*}
{%
  \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}%
  \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfusepathqfillstroke
}%


% An \otimes mark

\pgfdeclareplotmark{otimes}
{%
  \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}%
  \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
  \pgfusepathqstroke
}%

\pgfdeclareplotmark{otimes*}
{%
  \pgfpathcircle{\pgfpointorigin}{\pgfplotmarksize}%
  \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
  \pgfpathmoveto{\pgfqpoint{-.70710678\pgfplotmarksize}{.70710678\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.70710678\pgfplotmarksize}{-.70710678\pgfplotmarksize}}%
  \pgfusepathqfillstroke
}%


% A vertical bar mark

\pgfdeclareplotmark{|}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfusepathqstroke
}%



% A horizontal bar mark

\pgfdeclareplotmark{-}
{%
  \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfusepathqstroke
}%


% A square stroked mark

\pgfdeclareplotmark{square}
{%
  \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
  \pgfusepathqstroke
}%

% A square stroked-filled mark

\pgfdeclareplotmark{square*}
{%
  \pgfpathrectangle{\pgfqpoint{-\pgfplotmarksize}{-\pgfplotmarksize}}{\pgfqpoint{2\pgfplotmarksize}{2\pgfplotmarksize}}%
  \pgfusepathqfillstroke
}%


% A triangle mark

\pgfdeclareplotmark{triangle}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%


% A stroke-filled triangle mark

\pgfdeclareplotmark{triangle*}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-30}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-150}{\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqfillstroke
}%



% A diamond-shaped mark

\pgfdeclareplotmark{diamond}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
  \pgfpathclose
  \pgfusepathqstroke
}%


% A stroke-filled diamond-shaped mark

\pgfdeclareplotmark{diamond*}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
  \pgfpathclose
  \pgfusepathqfillstroke
}%



% A pentagon-shaped mark

\pgfdeclareplotmark{pentagon}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%

% A stroke-filled pentagon-shaped mark

\pgfdeclareplotmark{pentagon*}
{%
  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{18}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{-54}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{234}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpointpolar{162}{\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqfillstroke
}%

\newif\ifpgfmarktext@usetikznode
\pgfkeys{
  /pgf/text mark/.initial=p,
  /pgf/text mark style/.initial=,
  /pgf/text mark as node/.is if=pgfmarktext@usetikznode,
  /pgf/text mark as node/.default=true,
  %
  % backw. compat: the extra search path confuses the '.unknown'
  % handlers, so this here is deprecated:
  /pgf/text mark/style/.style={/pgf/text mark style={#1}},%
  /pgf/text mark/as node/.style={/pgf/text mark as node={#1}},%
}%

\pgfdeclareplotmark{text}
{
  \pgfkeysgetvalue{/pgf/text mark style}\pgfmarktext@style
  \pgfkeysgetvalue{/pgf/text mark}\pgfmarktext@
  \ifpgfmarktext@usetikznode
    \expandafter\node\expandafter[\pgfmarktext@style]{\pgfmarktext@};
  \else
    \expandafter\pgftext\expandafter[\pgfmarktext@style]{\pgfmarktext@}%
  \fi
}%

\pgfkeysdef{/pgf/mark color}{\def\pgf@mark@color{#1}}%
\let\pgf@mark@color\pgfutil@empty

\def\pgf@set@mark@color{%
    \ifx\pgf@mark@color\pgfutil@empty
        \pgfsys@color@rgb@fill{1}{1}{1}%
    \else
        \pgfsetfillcolor{\pgf@mark@color}%
    \fi
}%
\def\pgf@mark@color@none{none}%

% A half-down-filled and half-up-filled-white diamond-shaped mark
% (the shape can be rotated by "mark options = {rotate = 90}")
% created by Tomek

\pgfdeclareplotmark{halfcircle}{%
    \ifx\pgf@mark@color@none\pgf@mark@color
    \else
        \pgfscope
        \pgf@set@mark@color
        \pgfpathmoveto
            {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
        \pgfpatharc{180}{360}{\pgfplotmarksize}%
        \pgfusepathqfill
        \endpgfscope%
    \fi
    \pgfpathmoveto
        {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
    \pgfpathlineto
        {\pgfqpoint{\pgfplotmarksize}{0pt}}%
    \pgfpathcircle{\pgfpointorigin}%
        {\pgfplotmarksize}%
    \pgfusepathqstroke
}%
\pgfdeclareplotmark{halfcircle*}{%
    \pgfpathmoveto
        {\pgfqpoint{\pgfplotmarksize}{0pt}}%
    \pgfpatharc{0}{180}{\pgfplotmarksize}%
    \pgfpathclose
    \pgfusepathqfill
    \ifx\pgf@mark@color@none\pgf@mark@color
    \else
        \pgfscope
            \pgf@set@mark@color
            \pgfpathmoveto
                {\pgfqpoint{-\pgfplotmarksize}{0pt}}%
            \pgfpatharc{180}{360}{\pgfplotmarksize}%
            \pgfusepathqfill
        \endpgfscope%
    \fi
    \pgfpathcircle{\pgfpointorigin}%
        {\pgfplotmarksize}%
    \pgfusepathqstroke
}%

% A half-down-filled and half-up-filled-white diamond-shaped mark
% created by Magnus Tewes

\pgfdeclareplotmark{halfdiamond*}{%
  \pgfpathmoveto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
  \pgfusepathqfill
  \ifx\pgf@mark@color@none\pgf@mark@color
  \else
      \pgfscope
      \pgf@set@mark@color
      \pgfpathmoveto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
      \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
      \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
      \pgfusepathqfill
      \endpgfscope
  \fi
  \pgfpathmoveto{\pgfqpoint{.75\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-.75\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%

% A half-down-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes

\pgfdeclareplotmark{halfsquare*}{%
  \pgfpathmoveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfusepathqfill
  \ifx\pgf@mark@color@none\pgf@mark@color
  \else
      \pgfscope
          \pgf@set@mark@color
          \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
          \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
          \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
          \pgfusepathqfill
      \endpgfscope
  \fi
  \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%

% A half-right-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes

\pgfdeclareplotmark{halfsquare right*}{%
  \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfusepathqfill
  \ifx\pgf@mark@color@none\pgf@mark@color
  \else
      \pgfscope
          \pgf@set@mark@color
          \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
          \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
          \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
          \pgfusepathqfill
      \endpgfscope
  \fi
  \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%

% A half-left-filled and half-up-filled-white tilted-squared-shaped mark
% created by Magnus Tewes

\pgfdeclareplotmark{halfsquare left*}{%
  \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfusepathqfill
  \ifx\pgf@mark@color@none\pgf@mark@color
  \else
      \pgfscope
          \pgf@set@mark@color
          \pgfpathmoveto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
          \pgfpathlineto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
          \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
          \pgfusepathqfill
      \endpgfscope
  \fi
  \pgfpathmoveto{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{\pgfplotmarksize}}%
  \pgfpathlineto{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathlineto{\pgfqpoint{0pt}{-\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqstroke
}%


% A stroke-filled heart-shaped mark
% created by Magnus Tewes
\pgfdeclareplotmark{heart}{%
  \pgfpathmoveto{\pgfqpoint{0pt}{-1.75\pgfplotmarksize}}%
  \pgfpathcurveto{\pgfqpoint{0pt}{-1.75\pgfplotmarksize}}{\pgfqpoint{0pt}{-1.66\pgfplotmarksize}}{\pgfqpoint{-.5\pgfplotmarksize}{-1.165\pgfplotmarksize}}%
  \pgfpathcurveto{\pgfqpoint{-.5\pgfplotmarksize}{-1.165\pgfplotmarksize}}{\pgfqpoint{-\pgfplotmarksize}{-.75\pgfplotmarksize}}{\pgfqpoint{-\pgfplotmarksize}{0pt}}%
  \pgfpathcurveto{\pgfqpoint{-\pgfplotmarksize}{0pt}}{\pgfqpoint{-\pgfplotmarksize}{.5825\pgfplotmarksize}}{\pgfqpoint{-.5825\pgfplotmarksize}{.5825\pgfplotmarksize}}%
  \pgfpathcurveto{\pgfqpoint{-.5825\pgfplotmarksize}{.5825\pgfplotmarksize}}{\pgfqpoint{0pt}{.5825\pgfplotmarksize}}{\pgfqpoint{0pt}{0pt}}%
  \pgfpathcurveto{\pgfqpoint{0pt}{0pt}}{\pgfqpoint{0pt}{.5825\pgfplotmarksize}}{\pgfqpoint{.5825\pgfplotmarksize}{.5825\pgfplotmarksize}}%
  \pgfpathcurveto{\pgfqpoint{.5825\pgfplotmarksize}{.5825\pgfplotmarksize}}{\pgfqpoint{\pgfplotmarksize}{.5825\pgfplotmarksize}}{\pgfqpoint{\pgfplotmarksize}{0pt}}%
  \pgfpathcurveto{\pgfqpoint{\pgfplotmarksize}{0pt}}{\pgfqpoint{\pgfplotmarksize}{-.75\pgfplotmarksize}}{\pgfqpoint{.5\pgfplotmarksize}{-1.165\pgfplotmarksize}}%
  \pgfpathcurveto{\pgfqpoint{.5\pgfplotmarksize}{-1.165\pgfplotmarksize}}{\pgfqpoint{0pt}{-1.66\pgfplotmarksize}}{\pgfqpoint{0pt}{-1.75\pgfplotmarksize}}%
  \pgfpathclose
  \pgfusepathqfillstroke
}%


\endinput
