dropper-context.cpp revision 3955580a5a68a873b098921626f5b9d841b964ec
0N/A#define __SP_DROPPER_CONTEXT_C__
0N/A#ifdef HAVE_CONFIG_H
0N/A#include "libnr/n-art-bpath.h"
0N/A#include "display/canvas-bpath.h"
0N/A#include "display/canvas-arena.h"
0N/A#include "svg/svg-color.h"
350N/A#include "color-rgba.h"
113N/A#include "desktop-style.h"
113N/A#include "prefs-utils.h"
0N/A#include "sp-namedview.h"
0N/A#include "desktop-handles.h"
0N/A#include "selection.h"
0N/A#include "document.h"
350N/A#include "pixmaps/cursor-dropper.xpm"
350N/A#include "dropper-context.h"
0N/A#include "message-context.h"
0N/A#include "libnr/nr-scale-translate-ops.h"
1067N/A sizeof(SPDropperContextClass),
0N/A sizeof(SPDropperContext),
103N/A type = g_type_register_static(SP_TYPE_EVENT_CONTEXT, "SPDropperContext", &info, (GTypeFlags) 0);
103N/A sp_curve_unref(c);
103N/A sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(dc->area), 0x0000007f, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
0N/A case GDK_BUTTON_PRESS:
13N/A case GDK_MOTION_NOTIFY:
1064N/A gchar *where = dc->dragging ? g_strdup_printf(_(", averaged with radius %d"), (int) rw) : g_strdup_printf(_(" under cursor"));
1064N/A const gchar *message = dc->dragging ? _("<b>Release mouse</b> to set color.") : _("<b>Click</b> to set fill, <b>Shift+click</b> to set stroke; <b>drag</b> to average color in area; with <b>Alt</b> to pick inverse color; <b>Ctrl+C</b> to copy the color under mouse to clipboard");
0N/A case GDK_BUTTON_RELEASE:
0N/A ColorRGBA(1 - dc->R, 1 - dc->G, 1 - dc->B, alpha_to_set) : ColorRGBA(dc->R, dc->G, dc->B, alpha_to_set),
0N/A case GDK_KEY_PRESS:
370N/A case GDK_KP_Down:
370N/A if (!MOD__CTRL_ONLY) {
0N/A case GDK_Escape: