spray-tool.h revision 3a8b275440fe1616289b853119915f1feb719538
210N/A#ifndef __SP_SPRAY_CONTEXT_H__
210N/A#define __SP_SPRAY_CONTEXT_H__
210N/A
210N/A/*
943N/A * Spray Tool
210N/A *
210N/A * Authors:
919N/A * Pierre-Antoine MARC
919N/A * Pierre CACLIN
919N/A * Aurel-Aimé MARMION
919N/A * Julien LERAY
919N/A * Benoît LAVORATA
919N/A * Vincent MONTAGNE
919N/A * Pierre BARBRY-BLOT
919N/A * Jabiertxo ARRAIZA
919N/A *
919N/A * Copyright (C) 2009 authors
919N/A *
919N/A * Released under GNU GPL, read the file 'COPYING' for more information
919N/A */
919N/A
919N/A#include <2geom/point.h>
919N/A#include "ui/tools/tool-base.h"
919N/A
210N/A#define SP_SPRAY_CONTEXT(obj) (dynamic_cast<Inkscape::UI::Tools::SprayTool*>((Inkscape::UI::Tools::ToolBase*)obj))
210N/A#define SP_IS_SPRAY_CONTEXT(obj) (dynamic_cast<const Inkscape::UI::Tools::SprayTool*>((const Inkscape::UI::Tools::ToolBase*)obj) != NULL)
210N/A
210N/Anamespace Inkscape {
493N/A namespace UI {
210N/A namespace Dialog {
210N/A class Dialog;
851N/A }
210N/A }
911N/A}
911N/A
911N/A
911N/A#define SAMPLING_SIZE 8 /* fixme: ?? */
210N/A
210N/A#define TC_MIN_PRESSURE 0.0
210N/A#define TC_MAX_PRESSURE 1.0
210N/A#define TC_DEFAULT_PRESSURE 0.35
210N/A
210N/Anamespace Inkscape {
210N/Anamespace UI {
210N/Anamespace Tools {
493N/A
969N/Aenum {
210N/A SPRAY_MODE_COPY,
970N/A SPRAY_MODE_CLONE,
970N/A SPRAY_MODE_SINGLE_PATH,
970N/A SPRAY_OPTION,
493N/A};
210N/A
210N/Aclass SprayTool : public ToolBase {
210N/Apublic:
210N/A SprayTool();
210N/A virtual ~SprayTool();
493N/A
210N/A //ToolBase event_context;
210N/A //Inkscape::UI::Dialog::Dialog *dialog_option;//Attribut de type SprayOptionClass, localisé dans scr/ui/dialog
970N/A /* extended input data */
970N/A gdouble pressure;
970N/A
210N/A /* attributes */
bool dragging; /* mouse state: mouse is dragging */
bool usepressure;
bool usetilt;
bool usetext;
double width;
double ratio;
double tilt;
double rotation_variation;
double population;
double scale_variation;
double scale;
double mean;
double standard_deviation;
gint distrib;
gint mode;
bool is_drawing;
bool is_dilating;
bool has_dilated;
Geom::Point last_push;
SPCanvasItem *dilate_area;
bool overlap;
double offset;
sigc::connection style_set_connection;
static const std::string prefsPath;
virtual void setup();
virtual void set(const Inkscape::Preferences::Entry& val);
virtual bool root_handler(GdkEvent* event);
virtual const std::string& getPrefsPath();
void update_cursor(bool /*with_shift*/);
};
}
}
}
#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:fileencoding=utf-8:textwidth=99 :