-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomShapes.xaml
29 lines (27 loc) · 1.18 KB
/
CustomShapes.xaml
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
<p:ResourceDictionary
xmlns:p="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.devexpress.com/winfx/2008/xaml/diagram"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ShapeTemplate x:Key="{ShapeKey Sector}" DefaultSize="120, 120">
<Start X="0.5" Y="0" />
<Line X="0.5" Y="0.5"/>
<Line X="(COS(P0) + 1)/2" Y="(SIN(P0) + 1)/2" />
<Arc X="CreateArcPoint((COS(P0) + 1)/2, (SIN(P0) + 1)/2, 'X')"
Y="CreateArcPoint((COS(P0) + 1)/2, (SIN(P0) + 1)/2, 'Y')"
Direction="Counterclockwise"
Size="CreateSize(W/2, H/2)"/>
<Arc X="0.5" Y="0" Direction="Counterclockwise" Size="CreateSize(W/2, H/2)" />
<ShapeTemplate.ConnectionPoints>
<ShapePoint X="0.5" Y="1" />
<ShapePoint X="1" Y="0.5" />
<ShapePoint X="0.5" Y="0" />
<ShapePoint X="0" Y="0.5" />
</ShapeTemplate.ConnectionPoints>
<ShapeTemplate.Parameters>
<Parameter DefaultValue="0"
Point="CreatePoint((COS(P) + 1)/2*W, (SIN(P) + 1)/2*H)"
Value="atn2(P.Y/H*2-1, P.X/W*2-1)"
Min="-3.14" Max="3.14" />
</ShapeTemplate.Parameters>
</ShapeTemplate>
</p:ResourceDictionary>