~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu5

« back to all changes in this revision

Viewing changes to src/libnr/nr-scale-ops.h

  • Committer: Bazaar Package Importer
  • Author(s): Wolfram Quester
  • Date: 2004-06-02 10:35:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040602103545-q3x0q6xd2k1yj0fr
Tags: upstream-0.38.1
ImportĀ upstreamĀ versionĀ 0.38.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SEEN_NR_SCALE_OPS_H
 
2
#define SEEN_NR_SCALE_OPS_H
 
3
 
 
4
#include <libnr/nr-scale.h>
 
5
 
 
6
namespace NR {
 
7
 
 
8
inline Point operator*(Point const &p, scale const &s)
 
9
{
 
10
    return Point(p[X] * s[X],
 
11
                 p[Y] * s[Y]);
 
12
}
 
13
 
 
14
inline scale operator*(scale const &a, scale const &b)
 
15
{
 
16
    return scale(a[X] * b[X],
 
17
                 a[Y] * b[Y]);
 
18
}
 
19
 
 
20
inline scale operator/(scale const &numer, scale const &denom)
 
21
{
 
22
    return scale(numer[X] / denom[X],
 
23
                 numer[Y] / denom[Y]);
 
24
}
 
25
 
 
26
} /* namespace NR */
 
27
 
 
28
 
 
29
#endif /* !SEEN_NR_SCALE_OPS_H */
 
30
 
 
31
/*
 
32
  Local Variables:
 
33
  mode:c++
 
34
  c-file-style:"stroustrup"
 
35
  c-file-offsets:((innamespace . 0)(inline-open . 0))
 
36
  indent-tabs-mode:nil
 
37
  fill-column:99
 
38
  End:
 
39
*/
 
40
// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :