knot-holder-entity.cpp revision d40159e1107c18c6d4b1842fdb7da367e3013c52
#define __KNOT_HOLDER_ENTITY_C__
/** \file
* KnotHolderEntity definition.
*
* Authors:
* Mitsuru Oka <oka326@parkcity.ne.jp>
* Maximilian Albert <maximilian.albert@gmail.com>
*
* Copyright (C) 1999-2001 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2001 Mitsuru Oka
* Copyright (C) 2004 Monash University
* Copyright (C) 2008 Maximilian Albert
*
* Released under GNU GPL
*/
#include "knotholder.h"
#include "sp-item.h"
#include "style.h"
#include "prefs-utils.h"
#include "macros.h"
#include <libnr/nr-matrix-ops.h>
#include "sp-pattern.h"
#include "inkscape.h"
#include "snap.h"
#include "desktop-affine.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "sp-namedview.h"
int KnotHolderEntity::counter = 0;
void
{
this->parent_holder = parent;
update_knot();
_moved_connection = knot->_moved_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_moved_handler));
_click_connection = knot->_click_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_clicked_handler));
_ungrabbed_connection = knot->_ungrabbed_signal.connect(sigc::mem_fun(*parent_holder, &KnotHolder::knot_ungrabbed_handler));
}
{
/* unref should call destroy */
if (knot) {
} else {
// FIXME: This shouldn't occur. Perhaps it is caused by LPE PointParams being knotholder entities, too
// If so, it will likely be fixed with upcoming refactoring efforts.
}
}
void
{
}
/* Pattern manipulation */
{
return theta;
}
{
}
{
}
{
}
void
{
if ( state & GDK_CONTROL_MASK ) {
} else {
}
}
if (state) {
}
}
{
return sp_pattern_extract_trans(pat);
}
{
gdouble y = 0;
return delta;
}
void
PatternKnotHolderEntityAngle::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint state)
{
// get the angle from pattern 0,0 to the cursor pos
if ( state & GDK_CONTROL_MASK ) {
}
// get the scale from the current transform so we can keep it.
}
void
PatternKnotHolderEntityScale::knot_set(NR::Point const &p, NR::Point const &/*origin*/, guint /*state*/)
{
// get angle from current transform, (need get current scale first to calculate angle)
// Get the new scale from the position of the knotholder
}
{
a[4] = 0;
a[5] = 0;
return delta;
}
/*
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:encoding=utf-8:textwidth=99 :