-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagg_span_interpolator_adaptor.h.html
106 lines (94 loc) · 8.08 KB
/
agg_span_interpolator_adaptor.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
100
101
102
103
104
105
106
<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_SPAN_INTERPOLATOR_ADAPTOR_INCLUDED
<SPAN class="kw2">#define</SPAN> AGG_SPAN_INTERPOLATOR_ADAPTOR_INCLUDED
<SPAN class="kw2">#include</SPAN> <SPAN class="str">"<A href="agg_basics.h.html">agg_basics.h</A>"</SPAN>
<SPAN class="kw1">namespace</SPAN> agg
<SPAN class="op">{</SPAN>
<SPAN class="rem">//===============================================<A name="span_interpolator_adaptor"><B></B></A><A href="agg_span_interpolator_adaptor.h.html#span_interpolator_adaptor">span_interpolator_adaptor</A></SPAN>
<SPAN class="kw1">template</SPAN><SPAN class="op"><</SPAN><SPAN class="kw1">class</SPAN> Interpolator<SPAN class="op">,</SPAN> <SPAN class="kw1">class</SPAN> Distortion<SPAN class="op">></SPAN>
<SPAN class="kw1">class</SPAN> <A href="agg_span_interpolator_adaptor.h.html#span_interpolator_adaptor">span_interpolator_adaptor</A> : <SPAN class="kw1">public</SPAN> Interpolator
<SPAN class="op">{</SPAN>
<SPAN class="kw1">public</SPAN>:
<SPAN class="kw1">typedef</SPAN> Interpolator base_type<SPAN class="op">;</SPAN>
<SPAN class="kw1">typedef</SPAN> <SPAN class="kw1">typename</SPAN> base_type::trans_type trans_type<SPAN class="op">;</SPAN>
<SPAN class="kw1">typedef</SPAN> Distortion distortion_type<SPAN class="op">;</SPAN>
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<A href="agg_span_interpolator_adaptor.h.html#span_interpolator_adaptor">span_interpolator_adaptor</A><SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="op">{</SPAN><SPAN class="op">}</SPAN>
<A href="agg_span_interpolator_adaptor.h.html#span_interpolator_adaptor">span_interpolator_adaptor</A><SPAN class="op">(</SPAN><SPAN class="kw1">const</SPAN> trans_type<SPAN class="op">&</SPAN> trans<SPAN class="op">,</SPAN>
<SPAN class="kw1">const</SPAN> distortion_type<SPAN class="op">&</SPAN> dist<SPAN class="op">)</SPAN> :
base_type<SPAN class="op">(</SPAN>trans<SPAN class="op">)</SPAN><SPAN class="op">,</SPAN>
m_distortion<SPAN class="op">(</SPAN><SPAN class="op">&</SPAN>dist<SPAN class="op">)</SPAN>
<SPAN class="op">{</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<A href="agg_span_interpolator_adaptor.h.html#span_interpolator_adaptor">span_interpolator_adaptor</A><SPAN class="op">(</SPAN><SPAN class="kw1">const</SPAN> trans_type<SPAN class="op">&</SPAN> trans<SPAN class="op">,</SPAN>
<SPAN class="kw1">const</SPAN> distortion_type<SPAN class="op">&</SPAN> dist<SPAN class="op">,</SPAN>
<SPAN class="kw1">double</SPAN> x<SPAN class="op">,</SPAN> <SPAN class="kw1">double</SPAN> y<SPAN class="op">,</SPAN> <SPAN class="kw1">unsigned</SPAN> len<SPAN class="op">)</SPAN> :
base_type<SPAN class="op">(</SPAN>trans<SPAN class="op">,</SPAN> x<SPAN class="op">,</SPAN> y<SPAN class="op">,</SPAN> len<SPAN class="op">)</SPAN><SPAN class="op">,</SPAN>
m_distortion<SPAN class="op">(</SPAN><SPAN class="op">&</SPAN>dist<SPAN class="op">)</SPAN>
<SPAN class="op">{</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<SPAN class="kw1">const</SPAN> distortion_type<SPAN class="op">&</SPAN> distortion<SPAN class="op">(</SPAN><SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN>
<SPAN class="op">{</SPAN>
<SPAN class="kw1">return</SPAN> <SPAN class="op">*</SPAN>m_distortion<SPAN class="op">;</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<SPAN class="kw1">void</SPAN> distortion<SPAN class="op">(</SPAN><SPAN class="kw1">const</SPAN> distortion_type<SPAN class="op">&</SPAN> dist<SPAN class="op">)</SPAN>
<SPAN class="op">{</SPAN>
m_distortion <SPAN class="op">=</SPAN> dist<SPAN class="op">;</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<SPAN class="kw1">void</SPAN> coordinates<SPAN class="op">(</SPAN><SPAN class="kw1">int</SPAN><SPAN class="op">*</SPAN> x<SPAN class="op">,</SPAN> <SPAN class="kw1">int</SPAN><SPAN class="op">*</SPAN> y<SPAN class="op">)</SPAN> <SPAN class="kw1">const</SPAN>
<SPAN class="op">{</SPAN>
base_type::coordinates<SPAN class="op">(</SPAN>x<SPAN class="op">,</SPAN> y<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN>
m_distortion<SPAN class="op">-</SPAN><SPAN class="op">></SPAN>calculate<SPAN class="op">(</SPAN>x<SPAN class="op">,</SPAN> y<SPAN class="op">)</SPAN><SPAN class="op">;</SPAN>
<SPAN class="op">}</SPAN>
<SPAN class="kw1">private</SPAN>:
<SPAN class="rem">//--------------------------------------------------------------------</SPAN>
<SPAN class="kw1">const</SPAN> distortion_type<SPAN class="op">*</SPAN> m_distortion<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>