This file is indexed.

/usr/include/mapnik/svg/svg_path_commands.hpp is in libmapnik-dev 2.2.0+ds1-6build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
/*****************************************************************************
 *
 * This file is part of Mapnik (c++ mapping toolkit)
 *
 * Copyright (C) 2011 Artem Pavlenko
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 *****************************************************************************/

#ifndef MAPNIK_SVG_PATH_COMMANDS_HPP
#define MAPNIK_SVG_PATH_COMMANDS_HPP

// mapnik
#include <mapnik/global.hpp>

// boost
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>


namespace mapnik { namespace svg {

using namespace boost::fusion;

inline double deg2rad(double deg)
{
    return (M_PI * deg)/180.0;
}

template <typename PathType>
struct move_to
{
    template <typename T0, typename T1>
    struct result
    {
        typedef void type;
    };

    explicit move_to(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1>
    void operator() (T0 v, T1 rel) const
    {
        path_.move_to(at_c<0>(v),at_c<1>(v),rel); // impl
    }

    PathType & path_;
};

template <typename PathType>
struct hline_to
{
    template <typename T0, typename T1>
    struct result
    {
        typedef void type;
    };

    explicit hline_to(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1>
    void operator() (T0 const& x, T1 rel) const
    {
        path_.hline_to(x,rel);
    }

    PathType & path_;
};


template <typename PathType>
struct vline_to
{
    template <typename T0, typename T1>
    struct result
    {
        typedef void type;
    };

    explicit vline_to(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1>
    void operator() (T0 const& y, T1 rel) const
    {
        path_.vline_to(y,rel);
    }

    PathType & path_;
};

template <typename PathType>
struct line_to
{
    template <typename T0, typename T1>
    struct result
    {
        typedef void type;
    };

    explicit line_to(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1>
    void operator() (T0 const& v, T1 rel) const
    {
        path_.line_to(at_c<0>(v),at_c<1>(v),rel); // impl
    }

    PathType & path_;
};


template <typename PathType>
struct curve4
{
    template <typename T0, typename T1, typename T2, typename T3>
    struct result
    {
        typedef void type;
    };

    explicit curve4(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1,typename T2, typename T3>
    void operator() (T0 const& v0, T1 const& v1, T2 const& v2, T3 rel) const
    {
        path_.curve4(at_c<0>(v0),at_c<1>(v0),
                     at_c<0>(v1),at_c<1>(v1),
                     at_c<0>(v2),at_c<1>(v2),
                     rel); // impl
    }

    PathType & path_;
};


template <typename PathType>
struct curve4_smooth
{
    template <typename T0, typename T1, typename T2>
    struct result
    {
        typedef void type;
    };

    explicit curve4_smooth(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1,typename T2>
    void operator() (T0 const& v0, T1 const& v1, T2 rel) const
    {
        path_.curve4(at_c<0>(v0),at_c<1>(v0),
                     at_c<0>(v1),at_c<1>(v1),
                     rel); // impl
    }
    PathType & path_;
};

template <typename PathType>
struct curve3
{
    template <typename T0, typename T1, typename T2>
    struct result
    {
        typedef void type;
    };

    explicit curve3(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1,typename T2>
    void operator() (T0 const& v0, T1 const& v1, T2 rel) const
    {
        path_.curve3(at_c<0>(v0),at_c<1>(v0),
                     at_c<0>(v1),at_c<1>(v1),
                     rel); // impl
    }

    PathType & path_;
};

template <typename PathType>
struct curve3_smooth
{
    template <typename T0, typename T1>
    struct result
    {
        typedef void type;
    };

    explicit curve3_smooth(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1>
    void operator() (T0 const& v0, T1 rel) const
    {
        path_.curve3(at_c<0>(v0),at_c<1>(v0),
                     rel); // impl
    }

    PathType & path_;
};

template <typename PathType>
struct arc_to
{
    template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
    struct result
    {
        typedef void type;
    };

    explicit arc_to(PathType & path)
        : path_(path) {}

    template  <typename T0, typename T1,typename T2, typename T3, typename T4, typename T5>
    void operator() (T0 const& rv, T1 const& angle, T2 large_arc_flag, T3 sweep_flag, T4 const& v, T5 rel) const
    {
        path_.arc_to(at_c<0>(rv),at_c<1>(rv),
                     deg2rad(angle),large_arc_flag,sweep_flag,
                     at_c<0>(v),at_c<1>(v),
                     rel);
    }

    PathType & path_;
};

template <typename PathType>
struct close
{
    typedef void result_type;

    explicit close(PathType & path)
        : path_(path) {}

    void operator()() const
    {
        path_.close_subpath();
    }

    PathType & path_;
};

}}


#endif // MAPNIK_SVG_COMMANDS_HPP