% Keys for tikzopm triangles
%
% /pgf/tikzopmGeneralization : side length (of the triangle)
\pgfkeys{/opm/.cd,
side length/.code=#1,
side length/.default=15pt,
side length/.initial=15pt}
%\pgfkeys{/opm/side length=12pt}
\def\defaulttriangleanchors{%
\savedanchor{\upper}{%
\pgfpoint{0pt}{.5\pgf@ya}%
\mincorrect{\pgf@y}{\pgfshapeminheight}%
\advance\pgf@y by -2\pgfshapeouterysep%
}%
\pgfdeclareshape{tikzopmGeneralization}%
{ \nodeparts{}% this is a symbol only
%% xa: length
%% ya: height
\defaulttrianglelengths%
\defaulttriangleanchors%
%% draw the triangle
\backgroundpath{
\trianglepath%
\pgfusepath{stroke}%
}%
}
%% the consumes version allows for a more DSL like style
\tikzset{opmconsumption/.style={-open triangle 45, thick}}
\tikzset{opmconsumes/.style={open triangle 45-, thick}}
%% the yields version allows for a more DSL like style
\tikzset{opmresult/.style={-open triangle 45, thick}}
\tikzset{opmyields/.style={-open triangle 45, thick}}
%% the affects version allows for a more DSL like style
\tikzset{opmeffect/.style={open triangle 45-open triangle 45, thick}}
\tikzset{opmaffects/.style={open triangle 45-open triangle 45, thick}}
\pgfarrowsdeclarecombine*{twoopentriang}{twoopentriang}%
{open triangle 45}{open triangle 45}
{open triangle 45}{open triangle 45}
\tikzset{dbla/.style={postaction={draw,shorten >=-1pt, -open triangle 45}}}
%% the invkoes version allows for a more DSL like style
\tikzset{opminvocation/.style={-twoopentriang, thick}}
\tikzset{opminvokes/.style={-twoopentriang, thick}}