canvas-axonomgrid.h revision 4fad0164a37a4004e4568803b7817df5e6b017d9
#ifndef CANVAS_AXONOMGRID_H
#define CANVAS_AXONOMGRID_H
/*
* Authors:
* Johan Engelen <j.b.c.engelen@alumnus.utwente.nl>
*
* Copyright (C) 2006-2012 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "line-snapper.h"
#include "canvas-grid.h"
struct SPCanvasBuf;
struct SPNamedView;
};
void readRepr();
void onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive);
double lengthy; /**< The lengths of the primary y-axis */
bool scaled; /**< Whether the grid is in scaled mode */
double lyw; /**< Transformed length y by the affine for the zoom */
double lxw_x;
double lxw_z;
double spacing_ylines;
CanvasAxonomGrid(const CanvasAxonomGrid&);
void updateWidgets();
};
{
bool ThisSnapperMightSnap() const;
Geom::Coord getSnapperTolerance() const; //returns the tolerance of the snapper in screen pixels (i.e. independent of zoom)
bool getSnapperAlwaysSnap() const; //if true, then the snapper will always snap, regardless of its tolerance
void _addSnappedLine(IntermSnapResults &isr, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source, long source_num, Geom::Point const normal_to_line, const Geom::Point point_on_line) const;
void _addSnappedPoint(IntermSnapResults &isr, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source, long source_num, bool constrained_snap) const;
void _addSnappedLinePerpendicularly(IntermSnapResults &isr, Geom::Point const snapped_point, Geom::Coord const snapped_distance, SnapSourceType const &source, long source_num, bool constrained_snap) const;
};
}; //namespace Inkscape
#endif