~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/libnr/in-svg-plane.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SEEN_LIBNR_IN_SVG_PLANE_H
 
2
#define SEEN_LIBNR_IN_SVG_PLANE_H
 
3
 
 
4
#include "libnr/nr-point-fns.h"
 
5
 
 
6
 
 
7
/**
 
8
 * Returns true iff the coordinates of \a p are finite, non-NaN, and "small enough".  Currently we
 
9
 * use the magic number 1e18 for determining "small enough", as this number has in the past been
 
10
 * used in sodipodi code as a sort of "infinity" value.
 
11
 *
 
12
 * For SVG Tiny output, we might choose a smaller value corresponding to the range of valid numbers
 
13
 * in SVG Tiny (which uses fixed-point arithmetic).
 
14
 */
 
15
inline bool
 
16
in_svg_plane(NR::Point const p)
 
17
{
 
18
    return Geom::LInfty(p) < 1e18;
 
19
}
 
20
 
 
21
 
 
22
#endif /* !SEEN_LIBNR_IN_SVG_PLANE_H */
 
23
 
 
24
/*
 
25
  Local Variables:
 
26
  mode:c++
 
27
  c-file-style:"stroustrup"
 
28
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
29
  indent-tabs-mode:nil
 
30
  fill-column:99
 
31
  End:
 
32
*/
 
33
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :