-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagg_conv_stroke.h.html
99 lines (85 loc) · 12.9 KB
/
agg_conv_stroke.h.html
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
<HTML><HEAD><TITLE>Anti-Grain Geometry - </TITLE>
<META http-equiv="Content-Type" content="text/html"/>
<LINK rel="stylesheet" type="text/css" href="../../agg.styles.css"/>
</HEAD>
<TABLE width="640px" border="0" cellspacing="0" cellpadding="0"><TR><TD><PRE><SPAN class="rem">//----------------------------------------------------------------------------</SPAN>
<SPAN class="rem">// Anti-Grain Geometry (AGG) - Version 2.5</SPAN>
<SPAN class="rem">// A high quality rendering engine for C++</SPAN>
<SPAN class="rem">// Copyright (C) 2002-2006 Maxim Shemanarev</SPAN>
<SPAN class="rem">// Contact: [email protected]</SPAN>
<SPAN class="rem">// [email protected]</SPAN>
<SPAN class="rem">// http://antigrain.com</SPAN>
<SPAN class="rem">// </SPAN>
<SPAN class="rem">// AGG is free software; you can redistribute it and/or</SPAN>
<SPAN class="rem">// modify it under the terms of the GNU General Public License</SPAN>
<SPAN class="rem">// as published by the Free Software Foundation; either version 2</SPAN>
<SPAN class="rem">// of the License, or (at your option) any later version.</SPAN>
<SPAN class="rem">// </SPAN>
<SPAN class="rem">// AGG is distributed in the hope that it will be useful,</SPAN>
<SPAN class="rem">// but WITHOUT ANY WARRANTY; without even the implied warranty of</SPAN>
<SPAN class="rem">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</SPAN>
<SPAN class="rem">// GNU General Public License for more details.</SPAN>
<SPAN class="rem">// </SPAN>
<SPAN class="rem">// You should have received a copy of the GNU General Public License</SPAN>
<SPAN class="rem">// along with AGG; if not, write to the Free Software</SPAN>
<SPAN class="rem">// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, </SPAN>
<SPAN class="rem">// MA 02110-1301, USA.</SPAN>
<SPAN class="rem">//----------------------------------------------------------------------------</SPAN>
<SPAN class="kw2">#ifndef</SPAN> AGG_CONV_STROKE_INCLUDED
<SPAN class="kw2">#define</SPAN> AGG_CONV_STROKE_INCLUDED
<SPAN class="kw2">#include</SPAN> <SPAN class="str">"<A href="agg_basics.h.html">agg_basics.h</A>"</SPAN>
<SPAN class="kw2">#include</SPAN> <SPAN class="str">"<A href="agg_vcgen_stroke.h.html">agg_vcgen_stroke.h</A>"</SPAN>
<SPAN class="kw2">#include</SPAN> <SPAN class="str">"<A href="agg_conv_adaptor_vcgen.h.html">agg_conv_adaptor_vcgen.h</A>"</SPAN>
<SPAN class="kw1">namespace</SPAN> agg
<SPAN class="op">{</SPAN>
<SPAN class="rem">//-------------------------------------------------------------<A name="conv_stroke"><B></B></A><A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A></SPAN>
<SPAN class="kw1">template</SPAN><SPAN class="op"><</SPAN><SPAN class="kw1">class</SPAN> VertexSource<SPAN class="op">,</SPAN> <SPAN class="kw1">class</SPAN> Markers<SPAN class="op">=</SPAN><A href="agg_conv_adaptor_vcgen.h.html#null_markers">null_markers</A><SPAN class="op">></SPAN>
<SPAN class="kw1">struct</SPAN> <A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A> :
<SPAN class="kw1">public</SPAN> <A href="agg_conv_adaptor_vcgen.h.html#conv_adaptor_vcgen">conv_adaptor_vcgen</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> <A href="agg_vcgen_stroke.h.html#vcgen_stroke">vcgen_stroke</A><SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN>
<SPAN class="op">{</SPAN>
<SPAN class="kw1">typedef</SPAN> Markers marker_type<SPAN class="op">;</SPAN>
<SPAN class="kw1">typedef</SPAN> <A href="agg_conv_adaptor_vcgen.h.html#conv_adaptor_vcgen">conv_adaptor_vcgen</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> <A href="agg_vcgen_stroke.h.html#vcgen_stroke">vcgen_stroke</A><SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN> base_type<SPAN class="op">;</SPAN>
<A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A><SPAN class="op">(</SPAN>VertexSource<SPAN class="op">&</SPAN> vs<SPAN class="op">)</SPAN> :
<A href="agg_conv_adaptor_vcgen.h.html#conv_adaptor_vcgen">conv_adaptor_vcgen</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> <A href="agg_vcgen_stroke.h.html#vcgen_stroke">vcgen_stroke</A><SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN><SPAN class="op">(</SPAN>vs<SPAN class="op">)</SPAN>
<SPAN class="op">{</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> line_cap<SPAN class="op">(</SPAN><A href="agg_math_stroke.h.html#line_cap_e">line_cap_e</A> lc<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>line_cap<SPAN class="op">(</SPAN>lc<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> line_join<SPAN class="op">(</SPAN><A href="agg_math_stroke.h.html#line_join_e">line_join_e</A> lj<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>line_join<SPAN class="op">(</SPAN>lj<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> inner_join<SPAN class="op">(</SPAN><A href="agg_math_stroke.h.html#inner_join_e">inner_join_e</A> ij<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>inner_join<SPAN class="op">(</SPAN>ij<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<A href="agg_math_stroke.h.html#line_cap_e">line_cap_e</A> line_cap<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>line_cap<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<A href="agg_math_stroke.h.html#line_join_e">line_join_e</A> line_join<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>line_join<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<A href="agg_math_stroke.h.html#inner_join_e">inner_join_e</A> inner_join<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>inner_join<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> width<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> w<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>width<SPAN class="op">(</SPAN>w<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> miter_limit<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> ml<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>miter_limit<SPAN class="op">(</SPAN>ml<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> miter_limit_theta<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> t<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>miter_limit_theta<SPAN class="op">(</SPAN>t<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> inner_miter_limit<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> ml<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>inner_miter_limit<SPAN class="op">(</SPAN>ml<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> approximation_scale<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> as<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>approximation_scale<SPAN class="op">(</SPAN>as<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">double</SPAN> width<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>width<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">double</SPAN> miter_limit<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>miter_limit<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">double</SPAN> inner_miter_limit<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>inner_miter_limit<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">double</SPAN> approximation_scale<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>approximation_scale<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">void</SPAN> shorten<SPAN class="op">(</SPAN><SPAN class="kw1">double</SPAN> s<SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>shorten<SPAN class="op">(</SPAN>s<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">double</SPAN> shorten<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN> <SPAN class="op">{</SPAN> <SPAN class="kw1">return</SPAN> base_type::generator<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">.</SPAN>shorten<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN> <SPAN class="op">}</SPAN>
<SPAN class="kw1">private</SPAN>:
<A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A><SPAN class="op">(</SPAN><SPAN class="kw1">const</SPAN> <A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN><SPAN class="op">&</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN>
<SPAN class="kw1">const</SPAN> <A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN><SPAN class="op">&</SPAN>
<SPAN class="kw1">operator</SPAN> <SPAN class="op">=</SPAN> <SPAN class="op">(</SPAN><SPAN class="kw1">const</SPAN> <A href="agg_conv_stroke.h.html#conv_stroke">conv_stroke</A><SPAN class="op"><</SPAN>VertexSource<SPAN class="op">,</SPAN> Markers<SPAN class="op">></SPAN><SPAN class="op">&</SPAN><SPAN class="op">)</SPAN><SPAN class="op">;</SPAN>
<SPAN class="op">}</SPAN><SPAN class="op">;</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="kw2">#endif</SPAN>
</PRE></TD></TR></TABLE><FONT style="margin-left:1em"><I></I></FONT><TABLE width="640px" bgcolor="#583927" height="1px" border="0" cellspacing="0" cellpadding="0" style="margin:0px;"><TR><TD></TD></TR></TABLE>
<TABLE width="640px" border="0" cellspacing="0" cellpadding="0">
<TR><TD><CENTER><SPAN class="authors">
Copyright <SPAN class="larger">©</SPAN> 2002-2006
<A href="../../mcseem/index.html"><B>Maxim Shemanarev</B></A>
</SPAN></CENTER></TD></TR>
<TR><TD><CENTER><SPAN class="authors">
Web Design and Programming
<A href="../../mcseem/index.html"><B>Maxim Shemanarev</B></A>
</SPAN></CENTER></TD></TR>
</TABLE>
<BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/>
<BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/>
<BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/>
<BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/><BR/>
</HTML>