sp-conn-end.cpp revision e7333a0a54c8d33b7397406dd76938aa430836d5
#include "libnr/nr-matrix-div.h"
#include "libnr/nr-matrix-fns.h"
#include "sp-conn-end.h"
#include "sp-path.h"
#include "uri.h"
#include "document.h"
static double signed_one(double const x);
{
}
static SPObject const *
for (unsigned i = 0; i < 2; ++i) {
}
}
return anc_sofar;
}
static void
bool const updatePathRepr = true)
{
// TODO: SPItem::getBounds gives the wrong result for some objects
// that have internal representations that are updated later
// by the sp_*_update functions, e.g., text.
// Get the new route around obstacles.
if (updatePathRepr) {
path->updateRepr();
}
return;
}
/* Initial end-points: centre of attached object. */
};
for (unsigned h = 0; h < 2; ++h) {
if (!bbox) {
if (updatePathRepr) {
path->updateRepr();
}
return;
}
h2bbox_icoordsys[h] = *bbox;
}
// For each attached object, change the corresponding point to be
// on the edge of the bbox.
for (unsigned h = 0; h < 2; ++h) {
( last_seg_endPt[h] / h2i2anc[h] ));
}
} else {
// We leave the unattached endpoint where it is, and adjust the
// position of the attached endpoint to be on the edge of the bbox.
unsigned ind;
ind = 0;
}
else {
ind = 1;
}
if (!bbox) {
if (updatePathRepr) {
path->updateRepr();
}
return;
}
// For the attached object, change the corresponding point to be
// on the edge of the bbox.
( last_seg_pt / h2i2anc ));
// Leave the other where it is.
}
if (updatePathRepr) {
path->updateRepr();
}
}
// TODO: This triggering of makeInvalidPath could be cleaned up to be
// another option passed to move_compensate.
static void
{
}
}
void
{
}
void
{
}
// Don't update the path repr or else connector dragging is slowed by
// constant update of values to the xml editor, and each step is also
bool const updatePathRepr = false;
}
{
using NR::X;
using NR::Y;
if ( ctr == p ) {
/* Arbitrarily choose centre of right edge. */
ctr[Y]);
}
? Y
: X );
#ifndef NDEBUG
for (unsigned d = 0; d < 2; ++d) {
}
#endif
}
static double signed_one(double const x)
{
return (x < 0
? -1.
: 1.);
}
static void
{
#if 0
#else
#endif
}
static void
{
// todo: The first argument is the deleted object, or just NULL if
// called by sp_conn_end_detach.
char const *const attr_str[] = {"inkscape:connection-start",
"inkscape:connection-end"};
/* I believe this will trigger sp_conn_end_href_changed. */
}
void
{
}
void
{
/* No change, do nothing. */
} else {
if (value) {
// First, set the href field, because sp_conn_end_href_changed will need it.
// Now do the attaching, which emits the changed signal.
try {
} catch (Inkscape::BadURIException &e) {
/* TODO: Proper error handling as per
* http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. (Also needed for
* sp-use.) */
}
} else {
}
}
}
void
{
if (refobj) {
path));
}
}
}
/*
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 :