freehand-base.h revision aabf8eee394b26bde9fb5fd6fcc911f97891bd4b
#ifndef SEEN_SP_DRAW_CONTEXT_H
#define SEEN_SP_DRAW_CONTEXT_H
/*
* Generic drawing context
*
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* Copyright (C) 2000 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2002 Lauris Kaplinski
*
* Released under GNU GPL
*/
#include <stddef.h>
#include "ui/tools/tool-base.h"
#include "live_effects/effect.h"
/* Freehand context */
#define SP_DRAW_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::FreehandBase*>((Inkscape::UI::Tools::ToolBase*)obj))
#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::FreehandBase*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
struct SPDrawAnchor;
{
}
virtual ~FreehandBase();
bool attach;
// Red
// Blue
// Blue2
// Green
// White
// Start anchor
// End anchor
/* type of the LPE that is to be applied automatically to a finished path (if any) */
bool red_curve_is_valid;
bool anchor_statusbar;
};
/**
* Returns FIRST active anchor (the activated one).
*/
/**
* Concats red, blue and green.
* If any anchors are defined, process these, optionally removing curves from white list
* Invoke _flush_white to write result back to object.
*/
/**
* Snaps node or handle to PI/rotationsnapsperpi degree increments.
*
* @param dc draw context.
* @param p cursor point (to be changed by snapping).
* @param o origin point.
* @param state keyboard state to check if ctrl or shift was pressed.
*/
void spdc_endpoint_snap_rotation(ToolBase const *const ec, Geom::Point &p, Geom::Point const &o, guint state);
void spdc_endpoint_snap_free(ToolBase const *ec, Geom::Point &p, boost::optional<Geom::Point> &start_of_line, guint state);
/**
* If we have an item and a waiting LPE, apply the effect to the item
* (spiro spline mode is treated separately).
*/
/**
* Create a single dot represented by a circle.
*/
void spdc_create_single_dot(ToolBase *ec, Geom::Point const &pt, char const *tool, guint event_state);
}
}
}
#endif // SEEN_SP_DRAW_CONTEXT_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:fileencoding=utf-8:textwidth=99 :