seltrans.h revision 73c8d211f76b20d72ed2f10625491ab8c88bf4f2
#ifndef SEEN_SELTRANS_H
#define SEEN_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 "selcue.h"
#include "message-context.h"
#include <vector>
#include "sp-item.h"
#include "seltrans-handles.h"
struct SPKnot;
struct SPCanvasItem;
struct SPCtrlLine;
struct SPSelTransHandle;
{
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() {
return ( SP_KNOT_IS_VISIBLE (knots[0]) );
}
void getNextClosestPoint(bool reverse);
{
};
void _updateHandles();
void _updateVolatileState();
void _boundingBoxPrefsChanged(int prefs_bbox);
void _makeHandles();
enum State {
STATE_SCALE, //scale or stretch
STATE_ROTATE //rotate or skew
};
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
int _center_handle;
};
}
#endif // SEEN_SELTRANS_H
/*
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 :