seltrans.h revision 364d9045bfd158352b8040721b3e2e2602e921ea
#ifndef __SELTRANS_H__
#define __SELTRANS_H__
/*
* Helper object for transforming selected items
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Carl Hetherington <inkscape@carlh.net>
* Diederik van Lierop <mail@diedenrezi.nl>
*
* Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
* Copyright (C) 1999-2002 Lauris Kaplinski
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <stddef.h>
#include "knot.h"
#include "forward.h"
#include "selcue.h"
#include "message-context.h"
#include <vector>
#include "sp-item.h"
struct SPKnot;
{
Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false);
{
}
{
~SelTrans();
return _message_context;
}
void increaseState();
void resetState();
void ungrab();
void stamp();
gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
enum Show
{
};
_show = s;
}
bool isEmpty() {
return _empty;
}
bool isGrabbed() {
return _grabbed;
}
bool centerIsVisible() {
}
void _updateHandles();
void _updateVolatileState();
void _display_snapsource();
enum State {
STATE_SCALE, //scale or stretch
STATE_ROTATE //rotate or skew
};
std::vector<Inkscape::SnapCandidatePoint> _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints
std::vector<Inkscape::SnapCandidatePoint> _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating
bool _grabbed;
bool _show_handles;
bool _empty;
bool _changed;
/* According to Merriam - Webster's online dictionary
* Affine: a transformation (as a translation, a rotation, or a uniform stretching) that carries straight
* lines into straight lines and parallel lines into parallel lines but may alter distance between points
* and angles between lines <affine geometry>
*/
bool _center_is_set; ///< we've already set _center, no need to reread it from items
};
}
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :