summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e991e27)
raw | patch | inline | side by side (parent: e991e27)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 10 Nov 2007 04:52:54 +0000 (04:52 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 10 Nov 2007 04:52:54 +0000 (04:52 +0000) |
35 files changed:
index 5f4c429fa694c398a4f960888804914eaadfe7a3..637f8ef57fa7afec9469b2c0fea5d47ff26f4723 100644 (file)
* \brief Event handler for dialog windows
*
* Authors:
- * bulia byak <bulia@dr.com>
+ * bulia byak <bulia@dr.com>
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
*
* Copyright (C) 2003-2007 Authors
*
*/
void
-sp_dialog_defocus_callback (GtkWindow *win, gpointer data)
+sp_dialog_defocus_callback (GtkWindow */*win*/, gpointer data)
{
sp_dialog_defocus ((GtkWindow *)
gtk_widget_get_toplevel ((GtkWidget *) data));
// the taskbar in Win32.
if (prefs_get_int_attribute ( "options.dialogsskiptaskbar", "value", 0)) {
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE);
- }
-#endif
+ }
+#endif
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2 );
#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
transient_policy = 2;
- else
+ else
transient_policy = 0;
-#endif
+#endif
if (transient_policy) {
-
+
// if there's an active document window, attach dialog to it as a transient:
-
+
if ( SP_ACTIVE_DESKTOP )
{
SP_ACTIVE_DESKTOP->setWindowTransient (dialog, transient_policy);
}
void
-sp_transientize_callback ( Inkscape::Application * /*inkscape*/,
+sp_transientize_callback ( Inkscape::Application * /*inkscape*/,
SPDesktop *desktop, win_data *wd )
{
gint transient_policy = prefs_get_int_attribute_limited ( "options.transientpolicy", "value", 1, 0, 2);
#ifdef WIN32 // FIXME: Temporary Win32 special code to enable transient dialogs
if (prefs_get_int_attribute ( "options.dialogsontopwin32", "value", 0))
transient_policy = 2;
- else
+ else
return;
-#endif
+#endif
- if (!transient_policy)
+ if (!transient_policy)
return;
- if (wd->stop) {
- /*
- * if retransientizing of this dialog is still forbidden after
- * previous call warning turned off because it was confusingly fired
+ if (wd->stop) {
+ /*
+ * if retransientizing of this dialog is still forbidden after
+ * previous call warning turned off because it was confusingly fired
* when loading many files from command line
*/
- // g_warning("Retranzientize aborted! You're switching windows too fast!");
+ // g_warning("Retranzientize aborted! You're switching windows too fast!");
return;
}
-
+
if (wd->win)
{
wd->stop = 1; // disallow other attempts to retranzientize this dialog
desktop->setWindowTransient (wd->win, transient_policy);
}
-
+
// we're done, allow next retransientizing not sooner than after 6 msec
- gtk_timeout_add (6, (GtkFunction) sp_allow_again, (gpointer) wd);
+ gtk_timeout_add (6, (GtkFunction) sp_allow_again, (gpointer) wd);
}
void on_dialog_hide (GtkWidget *w)
}
gboolean
-sp_dialog_hide (GtkObject *object, gpointer data)
+sp_dialog_hide (GtkObject */*object*/, gpointer data)
{
GtkWidget *dlg = (GtkWidget *) data;
gboolean
-sp_dialog_unhide (GtkObject *object, gpointer data)
+sp_dialog_unhide (GtkObject */*object*/, gpointer data)
{
GtkWidget *dlg = (GtkWidget *) data;
index 3c0620feb47af8e341b601a168a5e45c06278b00..4935d5e5a0e8e28db4461c7f784858bb21c35f4a 100644 (file)
static void
-sp_fill_style_widget_construct ( SPWidget *spw, SPPaintSelector *psel )
+sp_fill_style_widget_construct( SPWidget *spw, SPPaintSelector */*psel*/ )
{
- (void)psel;
-
#ifdef SP_FS_VERBOSE
g_print ( "Fill style widget constructed: inkscape %p repr %p\n",
spw->inkscape, spw->repr );
} // end of sp_fill_style_widget_construct()
static void
-sp_fill_style_widget_modify_selection ( SPWidget *spw,
- Inkscape::Selection *selection,
- guint flags,
- SPPaintSelector *psel )
+sp_fill_style_widget_modify_selection( SPWidget *spw,
+ Inkscape::Selection */*selection*/,
+ guint flags,
+ SPPaintSelector */*psel*/ )
{
- (void)selection;
- (void)psel;
if (flags & ( SP_OBJECT_MODIFIED_FLAG |
SP_OBJECT_PARENT_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG) )
}
static void
-sp_fill_style_widget_change_subselection ( Inkscape::Application *inkscape,
- SPDesktop *desktop,
- SPWidget *spw )
+sp_fill_style_widget_change_subselection( Inkscape::Application */*inkscape*/,
+ SPDesktop */*desktop*/,
+ SPWidget *spw )
{
- (void)inkscape;
sp_fill_style_widget_update (spw);
}
static void
-sp_fill_style_widget_change_selection ( SPWidget *spw,
- Inkscape::Selection *selection,
- SPPaintSelector *psel )
+sp_fill_style_widget_change_selection( SPWidget *spw,
+ Inkscape::Selection */*selection*/,
+ SPPaintSelector */*psel*/ )
{
- (void)selection;
sp_fill_style_widget_update (spw);
}
static void
sp_fill_style_widget_paint_mode_changed ( SPPaintSelector *psel,
- SPPaintSelectorMode mode,
+ SPPaintSelectorMode /*mode*/,
SPWidget *spw )
{
- (void)mode;
if (g_object_get_data (G_OBJECT (spw), "update"))
return;
}
static void
-sp_fill_style_widget_fillrule_changed ( SPPaintSelector *psel,
+sp_fill_style_widget_fillrule_changed ( SPPaintSelector */*psel*/,
SPPaintSelectorFillRule mode,
SPWidget *spw )
{
- (void)psel;
if (g_object_get_data (G_OBJECT (spw), "update"))
return;
diff --git a/src/dialogs/find.cpp b/src/dialogs/find.cpp
index 8a82046040931f42b8dee477bfe6ee9c4ebf61f0..1418a0212f0f0477b594336384d0c8e26ceb357d 100644 (file)
--- a/src/dialogs/find.cpp
+++ b/src/dialogs/find.cpp
-static gboolean sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer data)
+static gboolean sp_find_dialog_delete(GtkObject *, GdkEvent *, gpointer /*data*/)
{
gtk_window_get_position (GTK_WINDOW (dlg), &x, &y);
gtk_window_get_size (GTK_WINDOW (dlg), &w, &h);
index db4eb34fcbe7d7f5881bb45eec00267922e44a3f..390452a8a6a06a06cd1543290ccad85276976d9e 100644 (file)
static void sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw);
static void
-sp_item_dialog_destroy (GtkObject *object, gpointer data)
+sp_item_dialog_destroy( GtkObject */*object*/, gpointer /*data*/ )
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
wd.win = dlg = NULL;
}
static gboolean
-sp_item_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
+sp_item_dialog_delete( GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/ )
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
return FALSE; // which means, go ahead and destroy it
-}
+}
/**
- * \brief Creates new instance of item properties widget
+ * \brief Creates new instance of item properties widget
*
*/
GtkWidget *
static void
-sp_item_widget_modify_selection ( SPWidget *spw,
- Inkscape::Selection *selection,
- guint flags,
- GtkWidget *itemw )
+sp_item_widget_modify_selection( SPWidget *spw,
+ Inkscape::Selection *selection,
+ guint /*flags*/,
+ GtkWidget */*itemw*/ )
{
sp_item_widget_setup (spw, selection);
}
static void
sp_item_widget_change_selection ( SPWidget *spw,
Inkscape::Selection *selection,
- GtkWidget *itemw )
+ GtkWidget */*itemw*/ )
{
sp_item_widget_setup (spw, selection);
}
item->setLocked(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
- sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+ sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))? _("Lock object") : _("Unlock object"));
gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
item->setExplicitlyHidden(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
- sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+ sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))? _("Hide object") : _("Unhide object"));
gtk_object_set_data (GTK_OBJECT (spw), "blocked", GUINT_TO_POINTER (FALSE));
}
static void
-sp_item_widget_label_changed (GtkWidget *widget, SPWidget *spw)
+sp_item_widget_label_changed( GtkWidget */*widget*/, SPWidget *spw )
{
if (gtk_object_get_data (GTK_OBJECT (spw), "blocked"))
return;
gtk_label_set_markup_with_mnemonic (GTK_LABEL (id_label), _("_Id"));
SP_EXCEPTION_INIT (&ex);
sp_object_setAttribute (SP_OBJECT (item), "id", id, &ex);
- sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+ sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
_("Set object ID"));
}
gchar *title = (gchar *)gtk_entry_get_text (GTK_ENTRY (w));
if (title != NULL) {
obj->setTitle(title);
- sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+ sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
_("Set object title"));
}
gchar *desc = NULL; /* TODO: get text from text buffer */
if (desc != NULL) {
obj->setDesc(desc);
- sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
+ sp_document_done (SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM,
_("Set object description"));
}
index 383d11f57b0e54a0559bd418c21ce9e09bf2fa6b..34bb5101c39d3dfe9be15ba3aabb06fcd203f417 100644 (file)
}
virtual bool activate_vfunc(GdkEvent* event,
- Gtk::Widget& widget,
+ Gtk::Widget& /*widget*/,
const Glib::ustring& path,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::CellRendererState flags)
+ const Gdk::Rectangle& /*background_area*/,
+ const Gdk::Rectangle& /*cell_area*/,
+ Gtk::CellRendererState /*flags*/)
{
_signal_pre_toggle.emit(event);
_signal_toggled.emit(path);
SPObject* _target;
};
-static gboolean layers_panel_activated( GtkObject *object, GdkEvent * /*event*/, gpointer data )
+static gboolean layers_panel_activated( GtkObject */*object*/, GdkEvent * /*event*/, gpointer data )
{
if ( data )
{
_store->foreach( sigc::bind<SPObject*>(sigc::mem_fun(*this, &LayersPanel::_checkForUpdated), layer) );
}
-bool LayersPanel::_checkForUpdated(const Gtk::TreePath &path, const Gtk::TreeIter& iter, SPObject* layer)
+bool LayersPanel::_checkForUpdated(const Gtk::TreePath &/*path*/, const Gtk::TreeIter& iter, SPObject* layer)
{
bool stopGoing = false;
Gtk::TreeModel::Row row = *iter;
}
}
-void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& path, Gtk::TreeModel::iterator const& iter )
+void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& /*path*/, Gtk::TreeModel::iterator const& iter )
{
Gtk::TreeModel::Row row = *iter;
if ( row ) {
@@ -648,7 +648,7 @@ void LayersPanel::_handleRowChange( Gtk::TreeModel::Path const& path, Gtk::TreeM
}
}
-bool LayersPanel::_rowSelectFunction( Glib::RefPtr<Gtk::TreeModel> const & model, Gtk::TreeModel::Path const & path, bool currentlySelected )
+bool LayersPanel::_rowSelectFunction( Glib::RefPtr<Gtk::TreeModel> const & /*model*/, Gtk::TreeModel::Path const & /*path*/, bool currentlySelected )
{
bool val = true;
if ( !currentlySelected && _toggleEvent )
index f6369f39ad306a87acf892d0712786da6223b84f..ee355a7740c0c2a7db18ad00a72edbaeb60c797a 100644 (file)
static void
-object_released (SPObject *object, GtkWidget *widget)
+object_released( SPObject */*object*/, GtkWidget *widget )
{
gtk_widget_destroy (widget);
}
static void
-window_destroyed (GtkObject *window, GtkObject *object)
+window_destroyed( GtkObject *window, GtkObject */*object*/ )
{
sigc::connection *release_connection = (sigc::connection *)g_object_get_data(G_OBJECT(window), "release_connection");
release_connection->disconnect();
index 5a59fd2e52f7677329f32bdf866c43133f82d285..279c5b5e714bb4c14b6b3d2e24c0edfaef7698f3 100644 (file)
static void
-sp_text_edit_dialog_destroy (GtkObject *object, gpointer data)
+sp_text_edit_dialog_destroy( GtkObject */*object*/, gpointer /*data*/ )
{
sp_signal_disconnect_by_data (INKSCAPE, dlg);
wd.win = dlg = NULL;
static gboolean
-sp_text_edit_dialog_delete (GtkObject *object, GdkEvent *event, gpointer data)
+sp_text_edit_dialog_delete( GtkObject */*object*/, GdkEvent */*event*/, gpointer /*data*/ )
{
gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
gtk_window_get_size ((GtkWindow *) dlg, &w, &h);
can handle keys like Esc and Ctrl+Z itself.
*/
gboolean
-text_view_focus_in (GtkWidget *w, GdkEventKey *event, gpointer data)
+text_view_focus_in( GtkWidget */*w*/, GdkEventKey */*event*/, gpointer data )
{
GObject *dlg = (GObject *) data;
g_object_set_data (dlg, "eatkeys", GINT_TO_POINTER (TRUE));
}
gboolean
-text_view_focus_out (GtkWidget *w, GdkEventKey *event, gpointer data)
+text_view_focus_out (GtkWidget */*w*/, GdkEventKey */*event*/, gpointer data)
{
GObject *dlg = (GObject *) data;
g_object_set_data (dlg, "eatkeys", GINT_TO_POINTER (FALSE));
gtk_box_pack_start (GTK_BOX (row), b, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (dlg), "text_anchor_end", b);
}
-
+
// align justify
{
// TODO - replace with Inkscape-specific call
{
GtkWidget *b = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- g_signal_connect ( G_OBJECT (b), "clicked",
+ g_signal_connect ( G_OBJECT (b), "clicked",
G_CALLBACK (sp_text_edit_dialog_close), dlg );
gtk_box_pack_end (GTK_BOX (hb), b, FALSE, FALSE, 0);
}
{
GtkWidget *b = gtk_button_new_from_stock (GTK_STOCK_APPLY);
GTK_WIDGET_SET_FLAGS (b, GTK_CAN_DEFAULT | GTK_HAS_DEFAULT);
- g_signal_connect ( G_OBJECT (b), "clicked",
+ g_signal_connect ( G_OBJECT (b), "clicked",
G_CALLBACK (sp_text_edit_dialog_apply), dlg );
gtk_box_pack_end ( GTK_BOX (hb), b, FALSE, FALSE, 0 );
g_object_set_data (G_OBJECT (dlg), "apply", b);
}
- g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection",
+ g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection",
G_CALLBACK (sp_text_edit_dialog_selection_modified), dlg);
- g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection",
+ g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection",
G_CALLBACK (sp_text_edit_dialog_selection_changed), dlg);
g_signal_connect (INKSCAPE, "change_subselection", G_CALLBACK (sp_text_edit_dialog_subselection_changed), dlg);
static void
-sp_text_edit_dialog_selection_modified ( Inkscape::Application *inkscape,
- Inkscape::Selection *sel,
- guint flags,
- GtkWidget *dlg )
+sp_text_edit_dialog_selection_modified( Inkscape::Application */*inkscape*/,
+ Inkscape::Selection */*sel*/,
+ guint flags,
+ GtkWidget *dlg )
{
gboolean style, content;
- style =
- ((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG |
+ style =
+ ((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG )) != 0 );
-
- content =
- ((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG |
+
+ content =
+ ((flags & ( SP_OBJECT_CHILD_MODIFIED_FLAG |
SP_TEXT_CONTENT_MODIFIED_FLAG )) != 0 );
-
+
sp_text_edit_dialog_read_selection (dlg, style, content);
-}
+}
static void
-sp_text_edit_dialog_selection_changed ( Inkscape::Application *inkscape,
- Inkscape::Selection *sel,
+sp_text_edit_dialog_selection_changed( Inkscape::Application */*inkscape*/,
+ Inkscape::Selection */*sel*/,
GtkWidget *dlg )
{
sp_text_edit_dialog_read_selection (dlg, TRUE, TRUE);
}
-static void sp_text_edit_dialog_subselection_changed ( Inkscape::Application *inkscape, SPDesktop *desktop, GtkWidget *dlg )
+static void sp_text_edit_dialog_subselection_changed( Inkscape::Application */*inkscape*/, SPDesktop */*desktop*/, GtkWidget *dlg )
{
sp_text_edit_dialog_read_selection (dlg, TRUE, FALSE);
}
gchar c[256];
font->Family(c, 256);
sp_repr_css_set_property (css, "font-family", c);
-
+
font->Attribute( "weight", c, 256);
sp_repr_css_set_property (css, "font-weight", c);
-
+
font->Attribute("style", c, 256);
sp_repr_css_set_property (css, "font-style", c);
-
+
font->Attribute("stretch", c, 256);
sp_repr_css_set_property (css, "font-stretch", c);
-
+
font->Attribute("variant", c, 256);
sp_repr_css_set_property (css, "font-variant", c);
-
+
Inkscape::CSSOStringStream os;
os << sp_font_selector_get_size (SP_FONT_SELECTOR (fontsel)) << "px"; // must specify px, see inkscape bug 1221626 and 1610103
sp_repr_css_set_property (css, "font-size", os.str().c_str());
-
+
font->Unref();
font=NULL;
}
-
+
/* Layout */
GtkWidget *b = (GtkWidget*)g_object_get_data (G_OBJECT (dlg), "text_anchor_start");
-
+
// Align Left
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (b))) {
sp_repr_css_set_property (css, "text-anchor", "start");
sp_repr_css_set_property (css, "text-align", "start");
} else {
// Align Center
- b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg),
+ b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg),
"text_anchor_middle");
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (b))) {
sp_repr_css_set_property (css, "text-anchor", "middle");
sp_repr_css_set_property (css, "text-align", "center");
} else {
// Align Right
- b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg),
+ b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg),
"text_anchor_end");
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (b))) {
sp_repr_css_set_property (css, "text-anchor", "end");
static void
-sp_text_edit_dialog_set_default (GtkButton *button, GtkWidget *dlg)
+sp_text_edit_dialog_set_default( GtkButton */*button*/, GtkWidget *dlg )
{
GtkWidget *def = (GtkWidget*)g_object_get_data (G_OBJECT (dlg), "default");
static void
-sp_text_edit_dialog_apply (GtkButton *button, GtkWidget *dlg)
+sp_text_edit_dialog_apply( GtkButton */*button*/, GtkWidget *dlg )
{
g_object_set_data (G_OBJECT (dlg), "blocked", GINT_TO_POINTER (TRUE));
}
// complete the transaction
- sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT,
+ sp_document_done (sp_desktop_document (SP_ACTIVE_DESKTOP), SP_VERB_CONTEXT_TEXT,
_("Set text style"));
gtk_widget_set_sensitive (apply, FALSE);
sp_repr_css_attr_unref (css);
}
static void
-sp_text_edit_dialog_close (GtkButton *button, GtkWidget *dlg)
+sp_text_edit_dialog_close( GtkButton */*button*/, GtkWidget *dlg )
{
gtk_widget_destroy (GTK_WIDGET (dlg));
}
// create temporary style
SPStyle *query = sp_style_new (SP_ACTIVE_DOCUMENT);
// query style from desktop into it. This returns a result flag and fills query with the style of subselection, if any, or selection
- int result_family = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
- int result_style = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
- int result_numbers = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTNUMBERS);
+ int result_family = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTFAMILY);
+ int result_style = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTSTYLE);
+ int result_numbers = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_FONTNUMBERS);
// If querying returned nothing, read the style from the text tool prefs (default style for new texts)
if (result_family == QUERY_STYLE_NOTHING || result_style == QUERY_STYLE_NOTHING || result_numbers == QUERY_STYLE_NOTHING) {
b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg), "text_anchor_end" );
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (b), TRUE);
-
+
if (query->writing_mode.computed == SP_CSS_WRITING_MODE_LR_TB) {
b = (GtkWidget*)g_object_get_data ( G_OBJECT (dlg), INKSCAPE_STOCK_WRITING_MODE_LR );
} else {
static void
-sp_text_edit_dialog_any_toggled (GtkToggleButton *tb, GtkWidget *dlg)
+sp_text_edit_dialog_any_toggled( GtkToggleButton */*tb*/, GtkWidget *dlg )
{
GtkWidget *apply, *def;
static void
-sp_text_edit_dialog_line_spacing_changed (GtkEditable *editable, GtkWidget *dlg)
+sp_text_edit_dialog_line_spacing_changed( GtkEditable */*editable*/, GtkWidget *dlg )
{
GtkWidget *apply, *def;
index e46b6e127bd1a297d4ec5382b01ab93a99c90312..86661efe379073c06a189439260220ea5de42e72 100644 (file)
## Experimental
##########################*/
-static void updateSelectionCallback(Inkscape::Application *inkscape, Inkscape::Selection *selection, TileDialog *dlg)
+static void updateSelectionCallback(Inkscape::Application */*inkscape*/, Inkscape::Selection */*selection*/, TileDialog *dlg)
{
TileDialog *tledlg = (TileDialog *) dlg;
tledlg->updateSelection();
index 1a58c4b19a9eb029d4fbe18c0f012b78e057d526..b4fa5523a28a01150b4097d9c3674952f0b91bb1 100644 (file)
}
static void
-sp_canvas_acetate_init (SPCanvasAcetate *acetate)
+sp_canvas_acetate_init (SPCanvasAcetate */*acetate*/)
{
- /* Nothing here */
+ /* Nothing here */
}
static void
}
static void
-sp_canvas_acetate_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags)
+sp_canvas_acetate_update( SPCanvasItem *item, NR::Matrix const &/*affine*/, unsigned int /*flags*/ )
{
- item->x1 = -G_MAXINT;
- item->y1 = -G_MAXINT;
- item->x2 = G_MAXINT;
- item->y2 = G_MAXINT;
+ item->x1 = -G_MAXINT;
+ item->y1 = -G_MAXINT;
+ item->x2 = G_MAXINT;
+ item->y2 = G_MAXINT;
}
static double
-sp_canvas_acetate_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item)
+sp_canvas_acetate_point( SPCanvasItem *item, NR::Point /*p*/, SPCanvasItem **actual_item )
{
- *actual_item = item;
+ *actual_item = item;
- return 0.0;
+ return 0.0;
}
index c8171ccd2c519a505d5d90c55d4c97090fcfc9b4..fa1f21d9a1a8c795b58817efe2af6c5da719ceb5 100644 (file)
/*
* 3D utils.
- *
+ *
* Authors:
* Jean-Rene Reinhard <jr@komite.net>
*
#define START(v) ((v)==BEGIN? 1 : 0)
#define FINISH(v) ((v)==END? 1 : 2)
-
+
signed char K_X[3][3][3][3] = {
//K_X[TOP]
{
{ 0, -2, 2},
{ 0, -1, 1}
},
- {
+ {
{ 0, 0, 0},
{-2, 0, 2},
{-1, 0, 1}
- },
- {
+ },
+ {
{ 0, 0, 0},
{-2, 2, 0},
{-1, 1, 0}
{ 0, -2, 2},
{ 0, -1, 1}
},
- {
+ {
{-1, 0, 1},
{-2, 0, 2},
{-1, 0, 1}
- },
- {
+ },
+ {
{-1, 1, 0},
{-2, 2, 0},
{-1, 1, 0}
{ 0, -2, 2},
{ 0, 0, 0}
},
- {
+ {
{-1, 0, 1},
{-2, 0, 2},
{ 0, 0, 0}
- },
- {
+ },
+ {
{-1, 1, 0},
{-2, 2, 0},
{ 0, 0, 0}
else
return MIDDLE;
}
-
+
//assumes in is RGBA
//should be made more resistant
void compute_surface_normal(Fvector &N, gdouble ss, NRPixBlock *in, int i, int j, int dx, int dy) {
@@ -132,7 +132,7 @@ void compute_surface_normal(Fvector &N, gdouble ss, NRPixBlock *in, int i, int j
}
N[X_3D] = -1 * ss * FACTOR_X[y_carac][x_carac] * accu_x / dx;
N[Y_3D] = -1 * ss * FACTOR_X[x_carac][y_carac] * accu_y / dy;
- N[Z_3D] = 1;
+ N[Z_3D] = 1;
normalize_vector(N);
//std::cout << "(" << N[X_3D] << ", " << N[Y_3D] << ", " << N[Z_3D] << ")" << std::endl;
}
}
gdouble norm(const Fvector &v) {
- return sqrt(v[X_3D]*v[X_3D] + v[Y_3D]*v[Y_3D] + v[Z_3D]*v[Z_3D]);
+ return sqrt(v[X_3D]*v[X_3D] + v[Y_3D]*v[Y_3D] + v[Z_3D]*v[Z_3D]);
}
void normalize_vector(Fvector &v) {
- int i, j;
gdouble nv = norm(v);
//TODO test nv == 0
- for (j = 0; j < 3; j++) {
+ for (int j = 0; j < 3; j++) {
v[j] /= nv;
}
-}
+}
gdouble scalar_product(const Fvector &a, const Fvector &b) {
return a[X_3D] * b[X_3D] +
index bba6f00c833e7d3967142446890810b2e9c7b89b..f734c0a592b3309b0e8fdae4814def7086e0e624 100644 (file)
}
static guint
-nr_arena_glyphs_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, guint reset)
+nr_arena_glyphs_update(NRArenaItem *item, NRRectL */*area*/, NRGC *gc, guint /*state*/, guint /*reset*/)
{
NRArenaGlyphs *glyphs;
raster_font *rfont;
}
static guint
-nr_arena_glyphs_clip(NRArenaItem *item, NRRectL *area, NRPixBlock *pb)
+nr_arena_glyphs_clip(NRArenaItem *item, NRRectL */*area*/, NRPixBlock */*pb*/)
{
NRArenaGlyphs *glyphs;
}
static NRArenaItem *
-nr_arena_glyphs_pick(NRArenaItem *item, NR::Point p, gdouble delta, unsigned int sticky)
+nr_arena_glyphs_pick(NRArenaItem *item, NR::Point p, gdouble /*delta*/, unsigned int /*sticky*/)
{
NRArenaGlyphs *glyphs;
@@ -249,7 +249,7 @@ nr_arena_glyphs_pick(NRArenaItem *item, NR::Point p, gdouble delta, unsigned int
}
void
-nr_arena_glyphs_set_path(NRArenaGlyphs *glyphs, SPCurve *curve, unsigned int lieutenant, font_instance *font, gint glyph, NRMatrix const *transform)
+nr_arena_glyphs_set_path(NRArenaGlyphs *glyphs, SPCurve */*curve*/, unsigned int /*lieutenant*/, font_instance *font, gint glyph, NRMatrix const *transform)
{
nr_return_if_fail(glyphs != NULL);
nr_return_if_fail(NR_IS_ARENA_GLYPHS(glyphs));
@@ -432,7 +432,7 @@ nr_arena_glyphs_group_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint s
static unsigned int
-nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_glyphs_group_render(cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int /*flags*/)
{
NRArenaItem *child;
index debd9bd0edbd8275e637b12c93f30c9e3f6372da..c0c53f0ee42b86501177580ea0da50d59110c817 100644 (file)
}
static unsigned int
-nr_arena_image_update (NRArenaItem *item, NRRectL *area, NRGC *gc, unsigned int state, unsigned int reset)
+nr_arena_image_update( NRArenaItem *item, NRRectL */*area*/, NRGC *gc, unsigned int /*state*/, unsigned int /*reset*/ )
{
NRMatrix grid2px;
#define b2i (image->grid2px)
static unsigned int
-nr_arena_image_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
+nr_arena_image_render( cairo_t *ct, NRArenaItem *item, NRRectL */*area*/, NRPixBlock *pb, unsigned int /*flags*/ )
{
nr_arena_image_x_sample = prefs_get_int_attribute ("options.bitmapoversample", "value", 1);
nr_arena_image_y_sample = nr_arena_image_x_sample;
}
static NRArenaItem *
-nr_arena_image_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int sticky)
+nr_arena_image_pick( NRArenaItem *item, NR::Point p, double delta, unsigned int /*sticky*/ )
{
NRArenaImage *image = NR_ARENA_IMAGE (item);
diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp
index 9ad60fef21ba6f8557204228cc59941782d15dd1..0c7cdb92e23f51ed8014e903f3bcc6b73689c750 100644 (file)
* \param module The Extension that should be loaded.
*/
bool
-Implementation::load(Inkscape::Extension::Extension *module) {
+Implementation::load(Inkscape::Extension::Extension */*module*/) {
return TRUE;
} /* Implementation::load */
void
-Implementation::unload(Inkscape::Extension::Extension *module) {
+Implementation::unload(Inkscape::Extension::Extension */*module*/) {
return;
} /* Implementation::unload */
to reimplement it to do something useful.
*/
ImplementationDocumentCache *
-Implementation::newDocCache (Inkscape::Extension::Extension * ext, Inkscape::UI::View::View * view) {
- return NULL;
+Implementation::newDocCache( Inkscape::Extension::Extension * /*ext*/, Inkscape::UI::View::View * /*view*/ ) {
+ return NULL;
}
bool
-Implementation::check(Inkscape::Extension::Extension *module) {
+Implementation::check(Inkscape::Extension::Extension */*module*/) {
/* If there are no checks, they all pass */
return TRUE;
} /* Implemenation::check */
}
Gtk::Widget *
-Implementation::prefs_input(Inkscape::Extension::Input *module, gchar const *filename) {
+Implementation::prefs_input(Inkscape::Extension::Input *module, gchar const */*filename*/) {
return module->autogui(NULL, NULL);
} /* Implementation::prefs_input */
SPDocument *
-Implementation::open(Inkscape::Extension::Input *module, gchar const *filename) {
+Implementation::open(Inkscape::Extension::Input */*module*/, gchar const */*filename*/) {
/* throw open_failed(); */
return NULL;
} /* Implementation::open */
} /* Implementation::prefs_output */
void
-Implementation::save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename) {
+Implementation::save(Inkscape::Extension::Output */*module*/, SPDocument */*doc*/, gchar const */*filename*/) {
/* throw save_fail */
return;
} /* Implementation::save */
Gtk::Widget *
-Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *view, sigc::signal<void> * changeSignal, ImplementationDocumentCache * docCache) {
+Implementation::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View */*view*/, sigc::signal<void> * /*changeSignal*/, ImplementationDocumentCache * /*docCache*/) {
return module->autogui(NULL, NULL);
} /* Implementation::prefs_effect */
void
-Implementation::effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, ImplementationDocumentCache * docCache) {
+Implementation::effect(Inkscape::Extension::Effect */*module*/, Inkscape::UI::View::View */*document*/, ImplementationDocumentCache * /*docCache*/) {
/* throw filter_fail */
return;
} /* Implementation::filter */
unsigned int
-Implementation::setup(Inkscape::Extension::Print *module)
+Implementation::setup(Inkscape::Extension::Print */*module*/)
{
return 0;
}
unsigned int
-Implementation::set_preview(Inkscape::Extension::Print *module)
+Implementation::set_preview(Inkscape::Extension::Print */*module*/)
{
return 0;
}
unsigned int
-Implementation::begin(Inkscape::Extension::Print *module, SPDocument *doc)
+Implementation::begin(Inkscape::Extension::Print */*module*/, SPDocument */*doc*/)
{
return 0;
}
unsigned int
-Implementation::finish(Inkscape::Extension::Print *module)
+Implementation::finish(Inkscape::Extension::Print */*module*/)
{
return 0;
}
/* Rendering methods */
unsigned int
-Implementation::bind(Inkscape::Extension::Print *module, NRMatrix const *transform, float opacity)
+Implementation::bind(Inkscape::Extension::Print */*module*/, NRMatrix const */*transform*/, float /*opacity*/)
{
return 0;
}
unsigned int
-Implementation::release(Inkscape::Extension::Print *module)
+Implementation::release(Inkscape::Extension::Print */*module*/)
{
return 0;
}
unsigned int
-Implementation::comment(Inkscape::Extension::Print *module, char const *comment)
+Implementation::comment(Inkscape::Extension::Print */*module*/, char const */*comment*/)
{
return 0;
}
unsigned int
-Implementation::fill(Inkscape::Extension::Print *module, NRBPath const *bpath, NRMatrix const *ctm, SPStyle const *style,
- NRRect const *pbox, NRRect const *dbox, NRRect const *bbox)
+Implementation::fill(Inkscape::Extension::Print */*module*/, NRBPath const */*bpath*/, NRMatrix const */*ctm*/, SPStyle const */*style*/,
+ NRRect const */*pbox*/, NRRect const */*dbox*/, NRRect const */*bbox*/)
{
return 0;
}
unsigned int
-Implementation::stroke(Inkscape::Extension::Print *module, NRBPath const *bpath, NRMatrix const *transform, SPStyle const *style,
- NRRect const *pbox, NRRect const *dbox, NRRect const *bbox)
+Implementation::stroke(Inkscape::Extension::Print */*module*/, NRBPath const */*bpath*/, NRMatrix const */*transform*/, SPStyle const */*style*/,
+ NRRect const */*pbox*/, NRRect const */*dbox*/, NRRect const */*bbox*/)
{
return 0;
}
unsigned int
-Implementation::image(Inkscape::Extension::Print *module, unsigned char *px, unsigned int w, unsigned int h, unsigned int rs,
- NRMatrix const *transform, SPStyle const *style)
+Implementation::image(Inkscape::Extension::Print */*module*/, unsigned char */*px*/, unsigned int /*w*/, unsigned int /*h*/, unsigned int /*rs*/,
+ NRMatrix const */*transform*/, SPStyle const */*style*/)
{
return 0;
}
unsigned int
-Implementation::text(Inkscape::Extension::Print *module, char const *text,
- NR::Point p, SPStyle const *style)
+Implementation::text(Inkscape::Extension::Print */*module*/, char const */*text*/,
+ NR::Point /*p*/, SPStyle const */*style*/)
{
return 0;
}
void
-Implementation::processPath(Inkscape::XML::Node * node)
+Implementation::processPath(Inkscape::XML::Node * /*node*/)
{
return;
}
paths more than they'll support text. (at least they do today)
*/
bool
-Implementation::textToPath(Inkscape::Extension::Print *ext)
+Implementation::textToPath(Inkscape::Extension::Print */*ext*/)
{
return false;
}
*/
bool
-Implementation::fontEmbedded(Inkscape::Extension::Print * ext)
+Implementation::fontEmbedded(Inkscape::Extension::Print * /*ext*/)
{
return false;
}
index 7352db6d5a69261079116827ce8a6d8ada88c73d..fb7d6a6f91bbcb1fa8f9f296f309e28498df9118 100644 (file)
}
SPDocument *
-XSLT::open(Inkscape::Extension::Input *module, gchar const *filename)
+XSLT::open(Inkscape::Extension::Input */*module*/, gchar const *filename)
{
xmlDocPtr filein = xmlParseFile(filename);
if (filein == NULL) { return NULL; }
xmlDocPtr result = xsltApplyStylesheet(_stylesheet, filein, params);
xmlFreeDoc(filein);
-
+
Inkscape::XML::Document * rdoc = sp_repr_do_read( result, SP_SVG_NS_URI);
xmlFreeDoc(result);
} else {
base = NULL;
name = g_strdup(filename);
- }
+ }
g_free(s);
SPDocument * doc = sp_document_create(rdoc, filename, base, name, true);
}
void
-XSLT::save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename)
+XSLT::save(Inkscape::Extension::Output */*module*/, SPDocument *doc, gchar const *filename)
{
g_return_if_fail(doc != NULL);
g_return_if_fail(filename != NULL);
index 5c64d982ae225e12aa848c29ff2c48a35ac3abdd..4a732fb495c193e67828fddbe302ac22e8decbaa 100644 (file)
\return Whether the load was sucessful
*/
bool
-BlurEdge::load (Inkscape::Extension::Extension *module)
+BlurEdge::load (Inkscape::Extension::Extension */*module*/)
{
// std::cout << "Hey, I'm Blur Edge, I'm loading!" << std::endl;
return TRUE;
\param document What should be edited.
*/
void
-BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
+BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
Inkscape::Selection * selection = ((SPDesktop *)document)->selection;
}
Gtk::Widget *
-BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
+BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * /*view*/, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
return module->autogui(NULL, NULL, changeSignal);
}
index 811f3576bac938c60e8d22a57bfb8fcb99b06086..d46c1870a7a0431bd51a354cb59e73d929172ee4 100644 (file)
\return Whether the load was sucessful
*/
bool
-GimpGrad::load (Inkscape::Extension::Extension *module)
+GimpGrad::load (Inkscape::Extension::Extension */*module*/)
{
// std::cout << "Hey, I'm loading!\n" << std::endl;
return TRUE;
\return None
*/
void
-GimpGrad::unload (Inkscape::Extension::Extension *module)
+GimpGrad::unload (Inkscape::Extension::Extension */*module*/)
{
// std::cout << "Nooo! I'm being unloaded!" << std::endl;
return;
to Inkscape.
*/
SPDocument *
-GimpGrad::open (Inkscape::Extension::Input *module, gchar const *filename)
+GimpGrad::open (Inkscape::Extension::Input */*module*/, gchar const *filename)
{
Inkscape::IO::dump_fopen_call(filename, "I");
FILE *gradient = Inkscape::IO::fopen_utf8name(filename, "r");
index 6937cdcc9b70a067c88aa035740c3b64580bed0a..57b1240352baa18bb209c34ef8d4e01651baf41e 100644 (file)
/**
\file grid.cpp
-
+
A plug-in to add a grid creation effect into Inkscape.
*/
/*
\return Whether the load was sucessful
*/
bool
-Grid::load (Inkscape::Extension::Extension *module)
+Grid::load (Inkscape::Extension::Extension */*module*/)
{
// std::cout << "Hey, I'm Grid, I'm loading!" << std::endl;
return TRUE;
\param document What should be edited.
*/
void
-Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
+Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
Inkscape::Selection * selection = ((SPDesktop *)document)->selection;
describing the parameter. */
PrefAdjustment(Inkscape::Extension::Extension * ext, char * pref) :
Gtk::Adjustment(0.0, 0.0, 10.0, 0.1), _ext(ext), _pref(pref) {
- this->set_value(_ext->get_param_float(_pref));
+ this->set_value(_ext->get_param_float(_pref));
this->signal_value_changed().connect(sigc::mem_fun(this, &PrefAdjustment::val_changed));
return;
};
Uses AutoGUI for creating the GUI.
*/
Gtk::Widget *
-Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * docCache)
+Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
SPDocument * current_document = view->doc();
using Inkscape::Util::GSListConstIterator;
GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
Inkscape::XML::Node * first_select = NULL;
- if (selected != NULL)
+ if (selected != NULL)
first_select = SP_OBJECT_REPR(*selected);
return module->autogui(current_document, first_select, changeSignal);
index 33cbfe1506229bb25de0384d4a33c56aa33d7843..182b6f0968b8bb47f8635b73e1eee0eece0d3a41 100644 (file)
This function is really simple, it just calls sp_document_new...
*/
SPDocument *
-Svg::open (Inkscape::Extension::Input *mod, const gchar *uri)
+Svg::open (Inkscape::Extension::Input */*mod*/, const gchar *uri)
{
#ifdef WITH_GNOME_VFS
if (!gnome_vfs_initialized() || gnome_vfs_uri_is_local(gnome_vfs_uri_new(uri))) {
return NULL;
}
SPDocument * doc = sp_document_new_from_mem(buffer, strlen(buffer), 1);
-
+
g_free(buffer);
return doc;
#else
gchar *save_path = g_path_get_dirname (uri);
- gboolean const spns = (!mod->get_id()
+ gboolean const spns = (!mod->get_id()
|| !strcmp (mod->get_id(), SP_MODULE_KEY_OUTPUT_SVG_INKSCAPE)
|| !strcmp (mod->get_id(), SP_MODULE_KEY_OUTPUT_SVGZ_INKSCAPE));
index 0ca73bc0e37cb2f7b310b35c21107ab2883b3755..3ad1c2ca58132ef1bcf24ae7afa32e9d3ca70ac6 100644 (file)
}
static void
-nr_svp_run_A8_OR (unsigned char *d, int len, int c0_24, int s0_24, void *data)
+nr_svp_run_A8_OR( unsigned char *d, int len, int c0_24, int s0_24, void */*data*/ )
{
if ((c0_24 >= 0xff0000) && (s0_24 == 0x0)) {
/* Simple copy */
index 419a631a571e205cbe1838370350fbdefbda1d29..0b37b14ec9c9f6ca0b32056f673ce86850ea284a 100644 (file)
if ( a.stroke_width > 0.01 && b.stroke_width <= 0.01 ) return false;
if ( a.stroke_width <= 0.01 && b.stroke_width > 0.01 ) return false;
if ( a.stroke_width <= 0.01 && b.stroke_width <= 0.01 ) return true;
-
+
if ( a.stroke_cap != b.stroke_cap ) return false;
if ( a.stroke_join != b.stroke_join ) return false;
if ( (int)(a.stroke_miter_limit*100) != (int)(b.stroke_miter_limit*100) ) return false;
static int ft2_conic_to(FREETYPE_VECTOR *control, FREETYPE_VECTOR *to, void *i_user)
{
ft2_to_liv* user=(ft2_to_liv*)i_user;
- NR::Point p(user->scale*to->x,user->scale*to->y),c(user->scale*control->x,user->scale*control->y);
+ NR::Point p(user->scale*to->x,user->scale*to->y),c(user->scale*control->x,user->scale*control->y);
// printf("b c=%f %f t=%f %f\n",c[0],c[1],p[0],p[1]);
user->theP->BezierTo(p);
user->theP->IntermBezierTo(c);
@@ -139,9 +139,9 @@ static int ft2_cubic_to(FREETYPE_VECTOR *control1, FREETYPE_VECTOR *control2, FR
ft2_to_liv* user=(ft2_to_liv*)i_user;
NR::Point p(user->scale*to->x,user->scale*to->y),
c1(user->scale*control1->x,user->scale*control1->y),
- c2(user->scale*control2->x,user->scale*control2->y);
+ c2(user->scale*control2->x,user->scale*control2->y);
// printf("c c1=%f %f c2=%f %f t=%f %f\n",c1[0],c1[1],c2[0],c2[1],p[0],p[1]);
- user->theP->CubicTo(p,3*(c1-user->last),3*(p-c2));
+ user->theP->CubicTo(p,3*(c1-user->last),3*(p-c2));
user->last=p;
return 0;
}
@@ -229,7 +229,7 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int
}
char* res=NULL;
bool free_res=false;
-
+
if ( strcmp(key,"name") == 0 ) {
PangoFontDescription* td=pango_font_description_copy(descr);
pango_font_description_unset_fields (td, PANGO_FONT_MASK_SIZE);
@@ -247,11 +247,11 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int
bool o = (style == PANGO_STYLE_OBLIQUE);
PangoWeight weight=pango_font_description_get_weight(descr);
bool b = (weight >= PANGO_WEIGHT_BOLD);
-
- res = g_strdup_printf ("%s%s%s%s",
- pango_font_description_get_family(descr),
- (b || i || o) ? "-" : "",
- (b) ? "Bold" : "",
+
+ res = g_strdup_printf ("%s%s%s%s",
+ pango_font_description_get_family(descr),
+ (b || i || o) ? "-" : "",
+ (b) ? "Bold" : "",
(i) ? "Italic" : ((o) ? "Oblique" : "") );
free_res = true;
}
@@ -316,7 +316,7 @@ unsigned int font_instance::Attribute(const gchar *key, gchar *str, unsigned int
if ( size > 0 ) str[0]=0;
return 0;
}
-
+
if (res) {
unsigned int len=strlen(res);
unsigned int rlen=(size-1<len)?size-1:len;
rise=otm.otmsCharSlopeRise;
#else
if ( !FT_IS_SCALABLE(theFace) ) return false; // bitmap font
-
+
TT_HoriHeader *hhea = (TT_HoriHeader*)FT_Get_Sfnt_Table(theFace, ft_sfnt_hhea);
if (hhea == NULL) return false;
run = hhea->caret_Slope_Run;
}
}
return 0;
-}
+}
-raster_font* font_instance::RasterFont(const NR::Matrix &trs,double stroke_width,bool vertical,JoinType stroke_join,ButtType stroke_cap,float miter_limit)
+raster_font* font_instance::RasterFont(const NR::Matrix &trs, double stroke_width, bool vertical, JoinType stroke_join, ButtType stroke_cap, float /*miter_limit*/)
{
font_style nStyle;
nStyle.transform=trs;
index 30a1050af52ac72026051466547b09498e9d318c..dcf76b3bddc17d171339fbe8a7ffa1f62e531ef1 100755 (executable)
@@ -177,7 +177,7 @@ Layout::Direction Layout::InputStreamTextSource::styleGetBlockProgression() cons
}
-static Layout::Alignment text_anchor_to_alignment(unsigned anchor, Layout::Direction para_direction)
+static Layout::Alignment text_anchor_to_alignment(unsigned anchor, Layout::Direction /*para_direction*/)
{
switch (anchor) {
default:
diff --git a/src/libnrtype/Layout-TNG-Scanline-Makers.cpp b/src/libnrtype/Layout-TNG-Scanline-Makers.cpp
index 73b4dd6fa7eea67516a142cb25d407fa034eddb8..bff94c151fad6b8445e6246233e21c2dced8e407 100755 (executable)
// it's not an important question because <flowSpan> doesn't have a y attribute
}
-bool Layout::ShapeScanlineMaker::canExtendCurrentScanline(Layout::LineHeight const &line_height)
+bool Layout::ShapeScanlineMaker::canExtendCurrentScanline(Layout::LineHeight const &/*line_height*/)
{
//we actually could return true if only the leading changed, but that's too much effort for something that rarely happens
return false;
diff --git a/src/line-snapper.cpp b/src/line-snapper.cpp
index b0dcca22c1e9a0cd3b672493daaeb1a175b11eae..3b5bd047c6ec346682c780f25946d5800261d11f 100644 (file)
--- a/src/line-snapper.cpp
+++ b/src/line-snapper.cpp
}
void Inkscape::LineSnapper::_doConstrainedSnap(SnappedConstraints &sc,
- Inkscape::Snapper::PointType const &t,
- NR::Point const &p,
- bool const &f,
- std::vector<NR::Point> &points_to_snap,
- ConstraintLine const &c,
- std::list<SPItem const *> const &it) const
+ Inkscape::Snapper::PointType const &/*t*/,
+ NR::Point const &p,
+ bool const &/*f*/,
+ std::vector<NR::Point> &/*points_to_snap*/,
+ ConstraintLine const &c,
+ std::list<SPItem const *> const &/*it*/) const
{
Inkscape::SnappedPoint s = SnappedPoint(p, NR_HUGE);
/* Get the lines that we will try to snap to */
const LineList lines = _getSnapLines(p);
-
+
for (LineList::const_iterator i = lines.begin(); i != lines.end(); i++) {
/* Normal to the line we're trying to snap along */
NR::Point const n(NR::rot90(NR::unit_vector(c.getDirection())));
NR::Point const point_on_line = c.hasPoint() ? c.getPoint() : p;
-
- /* Constant term of the line we're trying to snap along */
+
+ /* Constant term of the line we're trying to snap along */
NR::Coord const q = dot(n, point_on_line);
/* Try to intersect this line with the target line */
if (k == Geom::intersects) {
const NR::Coord dist = L2(t - p);
//Store any line that's within snapping range
- if (dist < getDistance()) {
+ if (dist < getDistance()) {
_addSnappedLine(sc, t, dist, c.getDirection(), t);
//SnappedLine dummy = SnappedLine(t, dist, c.getDirection(), t);
//sc.infinite_lines.push_back(dummy);
index ee656f9001a991d433eebf05c791378fa8f490d3..7ac9a7e7b2ec76aa0932df7d3249a9f43dcbbf57 100644 (file)
@@ -36,19 +36,19 @@ void Path::Outline(Path *dest, double width, JoinType join, ButtType butt, doubl
if ( dest == NULL ) {
return;
}
-
+
dest->Reset();
dest->SetBackData(false);
-
+
outline_callbacks calls;
NR::Point endButt;
NR::Point endPos;
calls.cubicto = StdCubicTo;
calls.bezierto = StdBezierTo;
calls.arcto = StdArcTo;
-
+
Path *rev = new Path;
-
+
// we repeat the offset contour creation for each subpath
int curP = 0;
do {
if (curP >= int(descr_cmd.size())) {
curP = descr_cmd.size();
}
-
+
if (curP > lastM + 1) {
// we have isolated a subpath, now we make a reversed version of it
// we do so by taking the subpath in the reverse and constructing a path as appropriate
while (curD > lastM && descr_cmd[curD]->getType() == descr_close) {
curD--;
}
-
+
int realP = curD + 1;
if (curD > lastM) {
curX = PrevPoint(curD);
@@ -142,7 +142,7 @@ void Path::Outline(Path *dest, double width, JoinType join, ButtType butt, doubl
curD--;
}
}
-
+
// offset the paths and glue everything
// actual offseting is done in SubContractOutline()
if (needClose) {
@@ -173,7 +173,7 @@ void Path::Outline(Path *dest, double width, JoinType join, ButtType butt, doubl
SubContractOutline (lastM, realP - lastM,
dest, calls, 0.0025 * width * width, width, join, butt,
miter, false, true, endPos, endButt);
-
+
endNor=endButt.ccw();
if (butt == butt_round) {
dest->ArcTo (endPos+width*endNor, 1.0001 * width, 1.0001 * width, 0.0, true, true);
@@ -191,7 +191,7 @@ void Path::Outline(Path *dest, double width, JoinType join, ButtType butt, doubl
}
} // if (curD > lastM)
} // if (curP > lastM + 1)
-
+
} while (curP < int(descr_cmd.size()));
delete rev;
if (dest == NULL) return;
dest->Reset ();
dest->SetBackData (false);
-
+
outline_callbacks calls;
NR::Point endButt, endPos;
calls.cubicto = StdCubicTo;
}
}
} while (curP < int(descr_cmd.size()));
-
+
delete rev;
}
void Path::SubContractOutline(int off, int num_pd,
Path *dest, outline_callbacks & calls,
double tolerance, double width, JoinType join,
- ButtType butt, double miter, bool closeIfNeeded,
+ ButtType /*butt*/, double miter, bool closeIfNeeded,
bool skipMoveto, NR::Point &lastP, NR::Point &lastT)
{
outline_callback_data callsData;
-
+
callsData.orig = this;
callsData.dest = dest;
int curP = 1;
-
+
// le moveto
NR::Point curX;
{
}
}
NR::Point curT(0, 0);
-
+
bool doFirst = true;
NR::Point firstP(0, 0);
NR::Point firstT(0, 0);
-
+
// et le reste, 1 par 1
while (curP < num_pd)
{
dest->Close ();
} else {
PathDescrLineTo temp(firstP);
-
+
TangentOnSegAt (0.0, curX, temp, stPos, stTgt,
stTle);
TangentOnSegAt (1.0, curX, temp, enPos, enTgt,
enTle);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
// jointure
{
NR::Point pos;
miter);
}
dest->LineTo (enPos+width*enNor);
-
+
// jointure
{
NR::Point pos;
{
PathDescrLineTo temp(firstP);
nextX = firstP;
-
+
TangentOnSegAt (0.0, curX, temp, stPos, stTgt, stTle);
TangentOnSegAt (1.0, curX, temp, enPos, enTgt, enTle);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
// jointure
{
OutlineJoin (dest, stPos, curT, stNor, width, join,
miter);
}
-
+
dest->LineTo (enPos+width*enNor);
-
+
// jointure
{
OutlineJoin (dest, enPos, enNor, firstT, width, join,
TangentOnSegAt (1.0, curX, *nData, enPos, enTgt, enTle);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
if (doFirst)
{
doFirst = false;
pos = curX;
OutlineJoin (dest, pos, curT, stNor, width, join, miter);
}
-
+
int n_d = dest->LineTo (nextX+width*enNor);
if (n_d >= 0)
{
enTle, enRad);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
if (doFirst)
{
doFirst = false;
pos = curX;
OutlineJoin (dest, pos, curT, stNor, width, join, miter);
}
-
+
callsData.piece = curP;
callsData.tSt = 0.0;
callsData.tEn = 1.0;
callsData.d.c.dx2 = nData->end[0];
callsData.d.c.dy2 = nData->end[1];
(calls.cubicto) (&callsData, tolerance, width);
-
+
curP++;
}
else if (nType == descr_arcto)
enRad);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt; // tjs definie
-
+
if (doFirst)
{
doFirst = false;
pos = curX;
OutlineJoin (dest, pos, curT, stNor, width, join, miter);
}
-
+
callsData.piece = curP;
callsData.tSt = 0.0;
callsData.tEn = 1.0;
callsData.d.a.clock = nData->clockwise;
callsData.d.a.large = nData->large;
(calls.arcto) (&callsData, tolerance, width);
-
+
curP++;
}
else if (nType == descr_bezierto)
PathDescrBezierTo* nBData = dynamic_cast<PathDescrBezierTo*>(descr_cmd[curD]);
int nbInterm = nBData->nb;
nextX = nBData->p;
-
+
if (IsNulCurve (descr_cmd, curD, curX)) {
curP += nbInterm + 1;
continue;
}
-
+
curP++;
curD = off + curP;
int ip = curD;
PathDescrIntermBezierTo* nData = dynamic_cast<PathDescrIntermBezierTo*>(descr_cmd[ip]);
-
+
if (nbInterm <= 0) {
// et on avance
PathDescrLineTo temp(nextX);
TangentOnSegAt (1.0, curX, temp, enPos, enTgt, enTle);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
if (doFirst) {
doFirst = false;
firstP = stPos;
TangentOnBezAt (1.0, curX, *nData, *nBData, true, enPos, enTgt, enTle, enRad);
stNor=stTgt.cw();
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
if (doFirst) {
doFirst = false;
firstP = stPos;
pos = curX;
OutlineJoin (dest, pos, curT, stNor, width, join, miter);
}
-
+
callsData.piece = curP;
callsData.tSt = 0.0;
callsData.tEn = 1.0;
callsData.d.b.mx = midX[0];
callsData.d.b.my = midX[1];
(calls.bezierto) (&callsData, tolerance, width);
-
+
} else if (nbInterm > 1) {
NR::Point bx=curX;
NR::Point cx=curX;
NR::Point dx=curX;
-
+
dx = nData->p;
TangentOnBezAt (0.0, curX, *nData, *nBData, false, stPos, stTgt, stTle, stRad);
stNor=stTgt.cw();
-
+
ip++;
nData = dynamic_cast<PathDescrIntermBezierTo*>(descr_cmd[ip]);
// et on avance
// dest->LineTo(curX+width*stNor.x,curY+width*stNor.y);
}
}
-
+
cx = 2 * bx - dx;
-
+
for (int k = 0; k < nbInterm - 1; k++) {
bx = cx;
cx = dx;
-
+
dx = nData->p;
ip++;
nData = dynamic_cast<PathDescrIntermBezierTo*>(descr_cmd[ip]);
NR::Point stx = (bx + cx) / 2;
// double stw=(bw+cw)/2;
-
+
PathDescrBezierTo tempb((cx + dx) / 2, 1);
PathDescrIntermBezierTo tempi(cx);
TangentOnBezAt (1.0, stx, tempi, tempb, true, enPos, enTgt, enTle, enRad);
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
callsData.piece = curP + k;
callsData.tSt = 0.0;
callsData.tEn = 1.0;
{
bx = cx;
cx = dx;
-
+
dx = nextX;
dx = 2 * dx - cx;
-
+
NR::Point stx = (bx + cx) / 2;
// double stw=(bw+cw)/2;
-
+
PathDescrBezierTo tempb((cx + dx) / 2, 1);
PathDescrIntermBezierTo tempi(cx);
TangentOnBezAt (1.0, stx, tempi, tempb, true, enPos,
enTgt, enTle, enRad);
enNor=enTgt.cw();
-
+
lastP = enPos;
lastT = enTgt;
-
+
callsData.piece = curP + nbInterm - 1;
callsData.tSt = 0.0;
callsData.tEn = 1.0;
callsData.d.b.mx = cx[0];
callsData.d.b.my = cx[1];
(calls.bezierto) (&callsData, tolerance, width);
-
+
}
}
-
+
// et on avance
curP += nbInterm;
}
{
}
}
-
+
}
/*
NR::Point A = nData->start + nData->end + 2*(curX - nData->p);
NR::Point B = 3*(nData->p - curX) - 2*nData->start - nData->end;
NR::Point C = nData->start;
- if (NR::LInfty(A) < 0.0001
- && NR::LInfty(B) < 0.0001
+ if (NR::LInfty(A) < 0.0001
+ && NR::LInfty(B) < 0.0001
&& NR::LInfty (C) < 0.0001) {
return true;
}
{
PathDescrArcTo* nData = dynamic_cast<PathDescrArcTo*>(cmd[curD]);
if ( NR::LInfty(nData->p - curX) < 0.00001) {
- if ((nData->large == false)
+ if ((nData->large == false)
|| (fabs (nData->rx) < 0.00001
|| fabs (nData->ry) < 0.00001)) {
return true;
@@ -935,12 +935,12 @@ void Path::TangentOnArcAt(double at, const NR::Point &iS, PathDescrArcTo const &
double const angle = fin.angle;
bool const large = fin.large;
bool const wise = fin.clockwise;
-
+
pos = iS;
tgt[0] = tgt[1] = 0;
if (rx <= 0.0001 || ry <= 0.0001)
return;
-
+
double const sex = iE[0] - iS[0], sey = iE[1] - iS[1];
double const ca = cos (angle), sa = sin (angle);
double csex = ca * sex + sa * sey;
@@ -958,7 +958,7 @@ void Path::TangentOnArcAt(double at, const NR::Point &iS, PathDescrArcTo const &
csdy /= l;
csdx *= d;
csdy *= d;
-
+
double sang;
double eang;
double rax = -csdx - csex / 2;
@@ -993,12 +993,12 @@ void Path::TangentOnArcAt(double at, const NR::Point &iS, PathDescrArcTo const &
if (ray < 0)
eang = 2 * M_PI - eang;
}
-
+
csdx *= rx;
csdy *= ry;
double drx = ca * csdx - sa * csdy;
double dry = sa * csdx + ca * csdy;
-
+
if (wise)
{
if (large == true)
@@ -1035,7 +1035,7 @@ void Path::TangentOnArcAt(double at, const NR::Point &iS, PathDescrArcTo const &
}
drx += (iS[0] + iE[0]) / 2;
dry += (iS[1] + iE[1]) / 2;
-
+
if (wise) {
if (sang < eang)
sang += 2 * M_PI;
@@ -1077,11 +1077,11 @@ Path::TangentOnCubAt (double at, NR::Point const &iS, PathDescrCubicTo const &fi
const NR::Point E = fin.p;
const NR::Point Sd = fin.start;
const NR::Point Ed = fin.end;
-
+
pos = iS;
tgt = NR::Point(0,0);
len = rad = 0;
-
+
const NR::Point A = Sd + Ed - 2*E + 2*iS;
const NR::Point B = 0.5*(Ed - Sd);
const NR::Point C = 0.25*(6*E - 6*iS - Sd - Ed);
@@ -1091,7 +1091,7 @@ Path::TangentOnCubAt (double at, NR::Point const &iS, PathDescrCubicTo const &fi
const NR::Point der = (3 * atb * atb)*A + (2 * atb)*B + C;
const NR::Point dder = (6 * atb)*A + 2*B;
const NR::Point ddder = 6 * A;
-
+
double l = NR::L2 (der);
// lots of nasty cases. inversion points are sadly too common...
if (l <= 0.0001) {
@@ -1118,9 +1118,9 @@ Path::TangentOnCubAt (double at, NR::Point const &iS, PathDescrCubicTo const &fi
return;
}
len = l;
-
+
rad = -l * (dot(der,der)) / (cross(dder,der));
-
+
tgt = der / l;
}
pos = iS;
tgt = NR::Point(0,0);
len = rad = 0;
-
+
const NR::Point A = fin.p + iS - 2*mid.p;
const NR::Point B = 2*mid.p - 2 * iS;
const NR::Point C = iS;
-
+
pos = at * at * A + at * B + C;
const NR::Point der = 2 * at * A + B;
const NR::Point dder = 2 * A;
double l = NR::L2(der);
-
+
if (l <= 0.0001) {
l = NR::L2(dder);
if (l <= 0.0001) {
}
len = l;
rad = -l * (dot(der,der)) / (cross(dder,der));
-
+
tgt = der / l;
}
@@ -1171,7 +1171,7 @@ Path::OutlineJoin (Path * dest, NR::Point pos, NR::Point stNor, NR::Point enNor,
const double angCo = dot (stNor, enNor);
// 1/1000 is very big/ugly, but otherwise it stuffs things up a little...
// 1/1000 est tres grossier, mais sinon ca merde tout azimut
- if ((width >= 0 && angSi > -0.001)
+ if ((width >= 0 && angSi > -0.001)
|| (width < 0 && angSi < 0.001)) {
if (angCo > 0.999) {
// straight ahead
@@ -1189,8 +1189,8 @@ Path::OutlineJoin (Path * dest, NR::Point pos, NR::Point stNor, NR::Point enNor,
// Use the ends of the cubic: approximate the arc at the
// point where .., and support better the rounding of
// coordinates of the end points.
-
- // utiliser des bouts de cubique: approximation de l'arc (au point ou on en est...), et supporte mieux
+
+ // utiliser des bouts de cubique: approximation de l'arc (au point ou on en est...), et supporte mieux
// l'arrondi des coordonnees des extremites
/* double angle=acos(angCo);
if ( angCo >= 0 ) {
PathDescrCubicTo temp(NR::Point(data->x2, data->y2),
NR::Point(data->d.c.dx1, data->d.c.dy1),
NR::Point(data->d.c.dx2, data->d.c.dy2));
-
+
NR::Point initial_point(data->x1, data->y1);
TangentOnCubAt (0.0, initial_point, temp, false, stPos, stTgt, stTle,
stRad);
miNor=miTgt.cw();
enNor=enTgt.cw();
}
-
+
double stGue = 1, miGue = 1, enGue = 1;
// correction of the lengths of the tangent to the offset
// if you don't see why i wrote that, draw a little figure and everything will be clear
@@ -1284,10 +1284,10 @@ Path::RecStdCubicTo (outline_callback_data * data, double tol, double width,
stGue *= stTle;
miGue *= miTle;
enGue *= enTle;
-
-
+
+
if (lev <= 0) {
- int n_d = data->dest->CubicTo (enPos + width*enNor,
+ int n_d = data->dest->CubicTo (enPos + width*enNor,
stGue*stTgt,
enGue*enTgt);
if (n_d >= 0) {
}
return;
}
-
+
NR::Point chk;
const NR::Point req = miPos + width * miNor;
{
}
} else {
outline_callback_data desc = *data;
-
+
desc.tSt = data->tSt;
desc.tEn = (data->tSt + data->tEn) / 2;
desc.x1 = data->x1;
desc.d.c.dx2 = 0.5 * miTle * miTgt[0];
desc.d.c.dy2 = 0.5 * miTle * miTgt[1];
RecStdCubicTo (&desc, tol, width, lev - 1);
-
+
desc.tSt = (data->tSt + data->tEn) / 2;
desc.tEn = data->tEn;
desc.x1 = miPos[0];
PathDescrArcTo temp(NR::Point(data->x2, data->y2),
data->d.a.rx, data->d.a.ry,
data->d.a.angle, data->d.a.large, data->d.a.clock);
-
+
NR::Point tmp(data->x1,data->y1);
TangentOnArcAt (data->d.a.stA, tmp, temp, stPos, stTgt,
stTle, stRad);
miNor=miTgt.cw();
enNor=enTgt.cw();
}
-
+
double stGue = 1, miGue = 1, enGue = 1;
if (fabs (stRad) > 0.01)
stGue += width / stRad;
if (scal > 2 * M_PI)
scal -= 2 * M_PI;
scal *= data->d.a.enA - data->d.a.stA;
-
+
if (lev <= 0)
{
int n_d = data->dest->CubicTo (enPos + width*enNor,
}
return;
}
-
+
NR::Point chk;
const NR::Point req = miPos + width*miNor;
{
}
} else {
outline_callback_data desc = *data;
-
+
desc.d.a.stA = data->d.a.stA;
desc.d.a.enA = (data->d.a.stA + data->d.a.enA) / 2;
RecStdArcTo (&desc, tol, width, lev - 1);
-
+
desc.d.a.stA = (data->d.a.stA + data->d.a.enA) / 2;
desc.d.a.enA = data->d.a.enA;
RecStdArcTo (&desc, tol, width, lev - 1);
index d59728e42d7813032d40136f1567769b4f9c51db..1d2dcec7dd501a8c2896a6ceef2c06787a0de277 100644 (file)
}
-SweepTree *SweepTreeList::add(Shape *iSrc, int iBord, int iWeight, int iStartPoint, Shape *iDst)
+SweepTree *SweepTreeList::add(Shape *iSrc, int iBord, int iWeight, int iStartPoint, Shape */*iDst*/)
{
if (nbTree >= maxTree) {
- return NULL;
+ return NULL;
}
-
+
int const n = nbTree++;
trees[n].MakeNew(iSrc, iBord, iWeight, iStartPoint);
index 90263d17cba9dd507add4774db03b61f0b44bbc0..0176bfdd0640764cfdcdd78c8f359d2d5487e2bd 100644 (file)
--- a/src/sp-paint-server.cpp
+++ b/src/sp-paint-server.cpp
return NULL;
}
-static void sp_painter_stale_fill(SPPainter *painter, NRPixBlock *pb)
+static void sp_painter_stale_fill(SPPainter */*painter*/, NRPixBlock *pb)
{
nr_pixblock_render_gray_noise(pb, NULL);
}
diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp
index bafb9de18241b8cac4bab43a7ee1873b855ab452..9be85785d8c97522127fb1f194d567a18157f289 100644 (file)
--- a/src/sp-switch.cpp
+++ b/src/sp-switch.cpp
@@ -115,7 +115,7 @@ void CSwitch::onOrderChanged (Inkscape::XML::Node *, Inkscape::XML::Node *, Inks
_reevaluate();
}
-void CSwitch::_reevaluate(bool add_to_arena) {
+void CSwitch::_reevaluate(bool /*add_to_arena*/) {
SPObject *evaluated_child = _evaluateFirst();
if (!evaluated_child || _cached_item == evaluated_child) {
return;
index f3b6ef32951aa3509150e16c1f2c8422a65abf1c..181920669f7ff9c10d4901ee15aee9aa3eeeb102 100644 (file)
* The reference corresponding to href of <tref> element.
*
* Copyright (C) 2007 Gail Banaszkiewicz
- *
+ *
* This file was created based on sp-use-reference.cpp
*
* Released under GNU GPL, read the file 'COPYING' for more information.
void SPTRefReference::updateObserver()
{
SPObject *referred = getObject();
-
+
if (referred) {
if (subtreeObserved) {
subtreeObserved->removeObserver(*this);
- delete subtreeObserved;
+ delete subtreeObserved;
}
-
+
subtreeObserved = new Inkscape::XML::Subtree(*SP_OBJECT_REPR(referred));
subtreeObserved->addObserver(*this);
}
}
-void SPTRefReference::notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child,
- Inkscape::XML::Node *prev)
+void SPTRefReference::notifyChildAdded(Inkscape::XML::Node &/*node*/, Inkscape::XML::Node &/*child*/,
+ Inkscape::XML::Node */*prev*/)
{
SPObject *owner = getOwner();
-
+
if (owner && SP_IS_TREF(owner)) {
sp_tref_update_text(SP_TREF(owner));
- }
+ }
}
-void SPTRefReference::notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child,
- Inkscape::XML::Node *prev)
+void SPTRefReference::notifyChildRemoved(Inkscape::XML::Node &/*node*/, Inkscape::XML::Node &/*child*/,
+ Inkscape::XML::Node */*prev*/)
{
SPObject *owner = getOwner();
-
+
if (owner && SP_IS_TREF(owner)) {
sp_tref_update_text(SP_TREF(owner));
}
}
-void SPTRefReference::notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child,
- Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev)
+void SPTRefReference::notifyChildOrderChanged(Inkscape::XML::Node &/*node*/, Inkscape::XML::Node &/*child*/,
+ Inkscape::XML::Node */*old_prev*/, Inkscape::XML::Node */*new_prev*/)
{
SPObject *owner = getOwner();
-
+
if (owner && SP_IS_TREF(owner)) {
sp_tref_update_text(SP_TREF(owner));
}
}
-
-
-void SPTRefReference::notifyContentChanged(Inkscape::XML::Node &node,
- Inkscape::Util::ptr_shared<char> old_content,
- Inkscape::Util::ptr_shared<char> new_content)
+
+
+void SPTRefReference::notifyContentChanged(Inkscape::XML::Node &/*node*/,
+ Inkscape::Util::ptr_shared<char> /*old_content*/,
+ Inkscape::Util::ptr_shared<char> /*new_content*/)
{
SPObject *owner = getOwner();
-
+
if (owner && SP_IS_TREF(owner)) {
sp_tref_update_text(SP_TREF(owner));
}
}
-void SPTRefReference::notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name,
- Inkscape::Util::ptr_shared<char> old_value,
- Inkscape::Util::ptr_shared<char> new_value)
+void SPTRefReference::notifyAttributeChanged(Inkscape::XML::Node &/*node*/, GQuark /*name*/,
+ Inkscape::Util::ptr_shared<char> /*old_value*/,
+ Inkscape::Util::ptr_shared<char> /*new_value*/)
{
// Do nothing - tref only cares about textual content
}
index e39b6b7b4e897f950c609bf60da65a0bcf3319fb..b8c724558bb84f0476c03afc27bac68be32756e0 100644 (file)
--- a/src/sp-use-reference.cpp
+++ b/src/sp-use-reference.cpp
@@ -143,6 +143,7 @@ sp_usepath_move_compensate(NR::Matrix const *mp, SPItem *original, SPUsePath *se
}
SPItem *item = SP_ITEM(self->owner);
+// TODO kill naughty naughty #if 0
#if 0
NR::Matrix m(*mp);
if (!(m.is_translation())) {
@@ -166,6 +167,9 @@ sp_usepath_move_compensate(NR::Matrix const *mp, SPItem *original, SPUsePath *se
// Commit the compensation.
item->transform *= clone_move;
sp_item_write_transform(item, SP_OBJECT_REPR(item), item->transform, &advertized_move);
+#else
+ (void)mp;
+ (void)original;
#endif
self->sourceDirty = true;
}
static void
-sp_usepath_source_modified(SPObject *iSource, guint flags, SPUsePath *offset)
+sp_usepath_source_modified(SPObject */*iSource*/, guint /*flags*/, SPUsePath *offset)
{
offset->sourceDirty = true;
offset->owner->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
diff --git a/src/text-editing.cpp b/src/text-editing.cpp
index 193ae7d6edc0dbedf462fdce11d673fc2eede415..dd054f06309fb0df3112169dde2bad075e8c1656 100644 (file)
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
@@ -980,7 +980,7 @@ sp_te_adjust_rotation_screen(SPItem *text, Inkscape::Text::Layout::iterator cons
}
void
-sp_te_adjust_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble degrees)
+sp_te_adjust_rotation(SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop */*desktop*/, gdouble degrees)
{
unsigned char_index;
TextTagAttributes *attributes = text_tag_attributes_at_position(text, std::min(start, end), &char_index);
@@ -1082,7 +1082,7 @@ sp_te_adjust_tspan_letterspacing_screen(SPItem *text, Inkscape::Text::Layout::it
}
void
-sp_te_adjust_linespacing_screen (SPItem *text, Inkscape::Text::Layout::iterator const &start, Inkscape::Text::Layout::iterator const &end, SPDesktop *desktop, gdouble by)
+sp_te_adjust_linespacing_screen (SPItem *text, Inkscape::Text::Layout::iterator const &/*start*/, Inkscape::Text::Layout::iterator const &/*end*/, SPDesktop *desktop, gdouble by)
{
// TODO: use start and end iterators to delineate the area to be affected
g_return_if_fail (text != NULL);
@@ -1128,27 +1128,27 @@ sp_te_adjust_linespacing_screen (SPItem *text, Inkscape::Text::Layout::iterator
else style->line_height.value *= (average_line_height + zby) / average_line_height;
break;
// absolute-type units
- case SP_CSS_UNIT_PX:
+ case SP_CSS_UNIT_PX:
style->line_height.computed += zby;
style->line_height.value = style->line_height.computed;
break;
- case SP_CSS_UNIT_PT:
+ case SP_CSS_UNIT_PT:
style->line_height.computed += zby * PT_PER_PX;
style->line_height.value = style->line_height.computed;
break;
- case SP_CSS_UNIT_PC:
+ case SP_CSS_UNIT_PC:
style->line_height.computed += zby * (PT_PER_PX / 12);
style->line_height.value = style->line_height.computed;
break;
- case SP_CSS_UNIT_MM:
+ case SP_CSS_UNIT_MM:
style->line_height.computed += zby * MM_PER_PX;
style->line_height.value = style->line_height.computed;
break;
- case SP_CSS_UNIT_CM:
+ case SP_CSS_UNIT_CM:
style->line_height.computed += zby * CM_PER_PX;
style->line_height.value = style->line_height.computed;
break;
- case SP_CSS_UNIT_IN:
+ case SP_CSS_UNIT_IN:
style->line_height.computed += zby * IN_PER_PX;
style->line_height.value = style->line_height.computed;
break;
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 4f761d8c321187f374dbf7fede9cd6965e3e9f32..4482544fb75795afa863faa2362fcad06ca7b774 100644 (file)
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
* tweaking paths without node editing
*
* Authors:
- * bulia byak
+ * bulia byak
*
* Copyright (C) 2007 authors
*
tc->do_l = (val && strcmp(val, "0"));
} else if (!strcmp(key, "doo")) {
tc->do_o = (val && strcmp(val, "0"));
- }
+ }
}
static void
get_dilate_radius (SPTweakContext *tc)
{
// 10 times the pen width:
- return 500 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
+ return 500 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
}
double
get_dilate_force (SPTweakContext *tc)
{
double force = 8 * (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE)
- /sqrt(SP_EVENT_CONTEXT(tc)->desktop->current_zoom());
+ /sqrt(SP_EVENT_CONTEXT(tc)->desktop->current_zoom());
if (force > 3) {
force += 4 * (force - 3);
}
@@ -400,25 +400,25 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
bool did_this = false;
NR::Matrix i2doc(sp_item_i2doc_affine(item));
if (mode == TWEAK_MODE_SHRINK || mode == TWEAK_MODE_GROW) {
- if (theShape->MakeTweak(tweak_mode_grow, theRes,
+ if (theShape->MakeTweak(tweak_mode_grow, theRes,
mode == TWEAK_MODE_GROW? force : -force,
join_straight, 4.0,
true, p, NR::Point(0,0), radius, &i2doc) == 0) // 0 means the shape was actually changed
did_this = true;
} else if (mode == TWEAK_MODE_ATTRACT || mode == TWEAK_MODE_REPEL) {
- if (theShape->MakeTweak(tweak_mode_repel, theRes,
+ if (theShape->MakeTweak(tweak_mode_repel, theRes,
mode == TWEAK_MODE_REPEL? force : -force,
join_straight, 4.0,
- true, p, NR::Point(0,0), radius, &i2doc) == 0)
+ true, p, NR::Point(0,0), radius, &i2doc) == 0)
did_this = true;
} else if (mode == TWEAK_MODE_PUSH) {
- if (theShape->MakeTweak(tweak_mode_push, theRes,
+ if (theShape->MakeTweak(tweak_mode_push, theRes,
0,
join_straight, 4.0,
true, p, force*2*vector, radius, &i2doc) == 0)
did_this = true;
} else if (mode == TWEAK_MODE_ROUGHEN) {
- if (theShape->MakeTweak(tweak_mode_roughen, theRes,
+ if (theShape->MakeTweak(tweak_mode_roughen, theRes,
force,
join_straight, 4.0,
true, p, NR::Point(0,0), radius, &i2doc) == 0)
@@ -456,7 +456,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
selection->add(newrepr);
}
- if (res->descr_cmd.size() > 1) {
+ if (res->descr_cmd.size() > 1) {
gchar *str = res->svg_dump_path();
if (newrepr) {
newrepr->setAttribute("d", str);
@@ -483,15 +483,15 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, NR::Poi
delete orig;
delete res;
- if (did_this)
+ if (did_this)
did = true;
}
return did;
}
-void
-tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
+void
+tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
{
float rgb_g[3];
@@ -500,11 +500,11 @@ tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s
sp_color_rgb_to_hsl_floatv (hsl_g, SP_RGBA32_R_F(goal), SP_RGBA32_G_F(goal), SP_RGBA32_B_F(goal));
float hsl_c[3];
sp_color_rgb_to_hsl_floatv (hsl_c, color[0], color[1], color[2]);
- if (!do_h)
+ if (!do_h)
hsl_g[0] = hsl_c[0];
- if (!do_s)
+ if (!do_s)
hsl_g[1] = hsl_c[1];
- if (!do_l)
+ if (!do_l)
hsl_g[2] = hsl_c[2];
sp_color_hsl_to_rgb_floatv (rgb_g, hsl_g[0], hsl_g[1], hsl_g[2]);
} else {
@@ -519,8 +519,8 @@ tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s
}
}
-void
-tweak_colorjitter (float *color, double force, bool do_h, bool do_s, bool do_l)
+void
+tweak_colorjitter (float *color, double force, bool do_h, bool do_s, bool do_l)
{
force = force*force; // in [0..1], this makes finer adjustments easier
sp_color_hsl_to_rgb_floatv (color, hsl_c[0], hsl_c[1], hsl_c[2]);
}
-void
-tweak_color (guint mode, float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
+void
+tweak_color (guint mode, float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
{
if (mode == TWEAK_MODE_COLORPAINT) {
tweak_colorpaint (color, goal, force, do_h, do_s, do_l);
@@ -571,7 +571,7 @@ tweak_opacity (guint mode, SPIScale24 *style_opacity, double opacity_goal, doubl
double
-tweak_profile (double dist, double radius)
+tweak_profile (double dist, double radius)
{
if (radius == 0)
return 0;
}
void
-tweak_colors_in_gradient (SPItem *item, bool fill_or_stroke,
- guint32 const rgb_goal, NR::Point p_w, double radius, double force, guint mode,
- bool do_h, bool do_s, bool do_l, bool do_o)
+tweak_colors_in_gradient (SPItem *item, bool fill_or_stroke,
+ guint32 const rgb_goal, NR::Point p_w, double radius, double force, guint mode,
+ bool do_h, bool do_s, bool do_l, bool /*do_o*/)
{
SPGradient *gradient = sp_item_gradient (item, fill_or_stroke);
if (pos > 1 || pos < 0) {
bool odd = ((int)(floor(pos)) % 2 == 1);
pos_e = pos - floor(pos);
- if (odd)
+ if (odd)
pos_e = 1 - pos_e;
}
}
// so it only affects the ends of this interstop;
// distribute the force between the two endstops so that they
// get all the painting even if they are not touched by the brush
- tweak_color (mode, stop->specified_color.v.c, rgb_goal,
- force * (pos_e - offset_l) / (offset_h - offset_l),
+ tweak_color (mode, stop->specified_color.v.c, rgb_goal,
+ force * (pos_e - offset_l) / (offset_h - offset_l),
do_h, do_s, do_l);
- tweak_color (mode, SP_STOP(child_prev)->specified_color.v.c, rgb_goal,
- force * (offset_h - pos_e) / (offset_h - offset_l),
+ tweak_color (mode, SP_STOP(child_prev)->specified_color.v.c, rgb_goal,
+ force * (offset_h - pos_e) / (offset_h - offset_l),
do_h, do_s, do_l);
SP_OBJECT(stop)->updateRepr();
child_prev->updateRepr();
break;
} else {
- // wide brush, may affect more than 2 stops,
+ // wide brush, may affect more than 2 stops,
// paint each stop by the force from the profile curve
- if (offset_l <= pos_e && offset_l > pos_e - r) {
- tweak_color (mode, SP_STOP(child_prev)->specified_color.v.c, rgb_goal,
+ if (offset_l <= pos_e && offset_l > pos_e - r) {
+ tweak_color (mode, SP_STOP(child_prev)->specified_color.v.c, rgb_goal,
force * tweak_profile (fabs (pos_e - offset_l), r),
do_h, do_s, do_l);
child_prev->updateRepr();
- }
+ }
- if (offset_h >= pos_e && offset_h < pos_e + r) {
- tweak_color (mode, stop->specified_color.v.c, rgb_goal,
+ if (offset_h >= pos_e && offset_h < pos_e + r) {
+ tweak_color (mode, stop->specified_color.v.c, rgb_goal,
force * tweak_profile (fabs (pos_e - offset_h), r),
do_h, do_s, do_l);
SP_OBJECT(stop)->updateRepr();
}
bool
-sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
+sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
guint32 fill_goal, bool do_fill,
guint32 stroke_goal, bool do_stroke,
float opacity_goal, bool do_opacity,
- NR::Point p, double radius, double force,
+ NR::Point p, double radius, double force,
bool do_h, bool do_s, bool do_l, bool do_o)
{
bool did = false;
if (SP_IS_GROUP(item)) {
for (SPObject *child = sp_object_first_child(SP_OBJECT(item)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
if (SP_IS_ITEM(child)) {
- if (sp_tweak_color_recursive (mode, SP_ITEM(child), item_at_point,
+ if (sp_tweak_color_recursive (mode, SP_ITEM(child), item_at_point,
fill_goal, do_fill,
stroke_goal, do_stroke,
opacity_goal, do_opacity,
@@ -798,8 +798,8 @@ sp_tweak_dilate (SPTweakContext *tc, NR::Point event_p, NR::Point p, NR::Point v
}
bool did = false;
- double radius = get_dilate_radius(tc);
- double force = get_dilate_force(tc);
+ double radius = get_dilate_radius(tc);
+ double force = get_dilate_force(tc);
if (radius == 0 || force == 0) {
return false;
}
@@ -808,7 +808,7 @@ sp_tweak_dilate (SPTweakContext *tc, NR::Point event_p, NR::Point p, NR::Point v
SPItem *item_at_point = SP_EVENT_CONTEXT(tc)->desktop->item_at_point(event_p, TRUE);
Inkscape::XML::Node *tool_repr = inkscape_get_repr(INKSCAPE, "tools.tweak");
SPCSSAttr *css = sp_repr_css_attr_inherited(tool_repr, "style");
- if (tc->mode == TWEAK_MODE_COLORPAINT && !css)
+ if (tc->mode == TWEAK_MODE_COLORPAINT && !css)
return false;
bool do_fill = false, do_stroke = false, do_opacity = false;
@@ -839,7 +839,7 @@ sp_tweak_dilate (SPTweakContext *tc, NR::Point event_p, NR::Point p, NR::Point v
if (tc->mode == TWEAK_MODE_COLORPAINT || tc->mode == TWEAK_MODE_COLORJITTER) {
if (do_fill || do_stroke || do_opacity) {
- if (sp_tweak_color_recursive (tc->mode, item, item_at_point,
+ if (sp_tweak_color_recursive (tc->mode, item, item_at_point,
fill_goal, do_fill,
stroke_goal, do_stroke,
opacity_goal, do_opacity,
switch (tc->mode) {
case TWEAK_MODE_PUSH:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Pushing %d</b> selected object",
+ ngettext("<b>Pushing %d</b> selected object",
"<b>Pushing %d</b> selected objects", num), num);
break;
case TWEAK_MODE_SHRINK:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Shrinking %d</b> selected object",
+ ngettext("<b>Shrinking %d</b> selected object",
"<b>Shrinking %d</b> selected objects", num), num);
break;
case TWEAK_MODE_GROW:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Growing %d</b> selected object",
+ ngettext("<b>Growing %d</b> selected object",
"<b>Growing %d</b> selected objects", num), num);
break;
case TWEAK_MODE_ATTRACT:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Attracting %d</b> selected object",
+ ngettext("<b>Attracting %d</b> selected object",
"<b>Attracting %d</b> selected objects", num), num);
break;
case TWEAK_MODE_REPEL:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Repelling %d</b> selected object",
+ ngettext("<b>Repelling %d</b> selected object",
"<b>Repelling %d</b> selected objects", num), num);
break;
case TWEAK_MODE_ROUGHEN:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Roughening %d</b> selected object",
+ ngettext("<b>Roughening %d</b> selected object",
"<b>Roughening %d</b> selected objects", num), num);
case TWEAK_MODE_COLORPAINT:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Painting %d</b> selected object",
+ ngettext("<b>Painting %d</b> selected object",
"<b>Painting %d</b> selected objects", num), num);
break;
case TWEAK_MODE_COLORJITTER:
tc->_message_context->setF(Inkscape::NORMAL_MESSAGE,
- ngettext("<b>Jittering colors in %d</b> selected object",
+ ngettext("<b>Jittering colors in %d</b> selected object",
"<b>Jittering colors in %d</b> selected objects", num), num);
break;
}
// dilating:
- if (tc->is_drawing && ( event->motion.state & GDK_BUTTON1_MASK )) {
+ if (tc->is_drawing && ( event->motion.state & GDK_BUTTON1_MASK )) {
sp_tweak_dilate (tc, motion_w, motion_doc, motion_doc - tc->last_push);
//tc->last_push = motion_doc;
tc->has_dilated = true;
tc->has_dilated = false;
switch (tc->mode) {
case TWEAK_MODE_PUSH:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Push tweak"));
break;
case TWEAK_MODE_SHRINK:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Shrink tweak"));
break;
case TWEAK_MODE_GROW:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Grow tweak"));
break;
case TWEAK_MODE_ATTRACT:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Attract tweak"));
break;
case TWEAK_MODE_REPEL:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Repel tweak"));
break;
case TWEAK_MODE_ROUGHEN:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Roughen tweak"));
break;
case TWEAK_MODE_COLORPAINT:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Color paint tweak"));
case TWEAK_MODE_COLORJITTER:
- sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
+ sp_document_done(sp_desktop_document(SP_EVENT_CONTEXT(tc)->desktop),
SP_VERB_CONTEXT_TWEAK, _("Color jitter tweak"));
break;
}
- }
+ }
break;
}
index f1c5993edb5fd2522140051bde78a0651eb38937..a87f473e87b66dbf2d78a4394bd197c944b537fa 100644 (file)
namespace UI {
namespace Dialog {
-void on_selection_changed(Inkscape::Application *inkscape, Inkscape::Selection *selection, Transformation *daad)
+void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection *selection, Transformation *daad)
{
int page = daad->getCurrentPage();
daad->updateSelection((Inkscape::UI::Dialog::Transformation::PageType)page, selection);
}
-void on_selection_modified ( Inkscape::Application *inkscape,
- Inkscape::Selection *selection,
- guint flags,
- Transformation *daad )
+void on_selection_modified( Inkscape::Application */*inkscape*/,
+ Inkscape::Selection *selection,
+ guint /*flags*/,
+ Transformation *daad )
{
int page = daad->getCurrentPage();
daad->updateSelection((Inkscape::UI::Dialog::Transformation::PageType)page, selection);
_page_rotate (4, 2),
_page_skew (4, 2),
_page_transform (3, 3),
- _scalar_move_horizontal (_("_Horizontal"), _("Horizontal displacement (relative) or position (absolute)"), UNIT_TYPE_LINEAR,
+ _scalar_move_horizontal (_("_Horizontal"), _("Horizontal displacement (relative) or position (absolute)"), UNIT_TYPE_LINEAR,
"", "arrows_hor", &_units_move),
- _scalar_move_vertical (_("_Vertical"), _("Vertical displacement (relative) or position (absolute)"), UNIT_TYPE_LINEAR,
+ _scalar_move_vertical (_("_Vertical"), _("Vertical displacement (relative) or position (absolute)"), UNIT_TYPE_LINEAR,
"", "arrows_ver", &_units_move),
- _scalar_scale_horizontal(_("_Width"), _("Horizontal size (absolute or percentage of current)"), UNIT_TYPE_DIMENSIONLESS,
+ _scalar_scale_horizontal(_("_Width"), _("Horizontal size (absolute or percentage of current)"), UNIT_TYPE_DIMENSIONLESS,
"", "transform_scale_hor", &_units_scale),
- _scalar_scale_vertical (_("_Height"), _("Vertical size (absolute or percentage of current)"), UNIT_TYPE_DIMENSIONLESS,
+ _scalar_scale_vertical (_("_Height"), _("Vertical size (absolute or percentage of current)"), UNIT_TYPE_DIMENSIONLESS,
"", "transform_scale_ver", &_units_scale),
- _scalar_rotate (_("A_ngle"), _("Rotation angle (positive = counterclockwise)"), UNIT_TYPE_RADIAL,
+ _scalar_rotate (_("A_ngle"), _("Rotation angle (positive = counterclockwise)"), UNIT_TYPE_RADIAL,
"", "transform_rotate", &_units_rotate),
- _scalar_skew_horizontal (_("_Horizontal"), _("Horizontal skew angle (positive = counterclockwise), or absolute displacement, or percentage displacement"), UNIT_TYPE_LINEAR,
+ _scalar_skew_horizontal (_("_Horizontal"), _("Horizontal skew angle (positive = counterclockwise), or absolute displacement, or percentage displacement"), UNIT_TYPE_LINEAR,
"", "transform_scew_hor", &_units_skew),
- _scalar_skew_vertical (_("_Vertical"), _("Vertical skew angle (positive = counterclockwise), or absolute displacement, or percentage displacement"), UNIT_TYPE_LINEAR,
+ _scalar_skew_vertical (_("_Vertical"), _("Vertical skew angle (positive = counterclockwise), or absolute displacement, or percentage displacement"), UNIT_TYPE_LINEAR,
"", "transform_scew_ver", &_units_skew),
_scalar_transform_a ("_A", _("Transformation matrix element A")),
}
void
-Transformation::onSwitchPage(GtkNotebookPage *page,
+Transformation::onSwitchPage(GtkNotebookPage */*page*/,
guint pagenum)
{
updateSelection((PageType)pagenum, sp_desktop_selection(SP_ACTIVE_DESKTOP));
}
}
- sp_document_done ( sp_desktop_document (selection->desktop()) , SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done ( sp_desktop_document (selection->desktop()) , SP_VERB_DIALOG_TRANSFORM,
_("Move"));
}
for (GSList const *l = selection->itemList(); l != NULL; l = l->next) {
SPItem *item = SP_ITEM(l->data);
NR::scale scale (0,0);
- // the values are increments!
+ // the values are increments!
if (_units_scale.isAbsolute()) {
NR::Maybe<NR::Rect> bbox(sp_item_bbox_desktop(item));
if (bbox) {
}
}
- sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
_("Scale"));
}
}
}
- sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
_("Rotate"));
}
}
}
- sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
_("Skew"));
}
sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform
}
- sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
_("Edit transformation matrix"));
}
index 74cc44be9a3ec86a7d848bca5b653888872412d1..f3fba93bffe925fb1113522e7786f7fd6f99e354 100644 (file)
}
- GdlDockItemBehavior gdl_dock_behavior =
+ GdlDockItemBehavior gdl_dock_behavior =
(prefs_get_int_attribute_limited ("options.dock", "cancenterdock", 1, 0, 1) == 0 ?
GDL_DOCK_ITEM_BEH_CANT_DOCK_CENTER
: GDL_DOCK_ITEM_BEH_NORMAL);
if (!icon_name.empty()) {
Gtk::Widget *icon = sp_icon_get_icon(icon_name, Inkscape::ICON_SIZE_MENU);
if (icon) {
- // check icon type (inkscape, gtk, none)
- if ( SP_IS_ICON(icon->gobj()) ) {
+ // check icon type (inkscape, gtk, none)
+ if ( SP_IS_ICON(icon->gobj()) ) {
SPIcon* sp_icon = SP_ICON(icon->gobj());
sp_icon_fetch_pixbuf(sp_icon);
_icon_pixbuf = Glib::wrap(sp_icon->pb, true);
@@ -67,12 +67,12 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
}
delete icon;
- _gdl_dock_item =
- gdl_dock_item_new_with_pixbuf_icon(name.c_str(), long_name.c_str(),
+ _gdl_dock_item =
+ gdl_dock_item_new_with_pixbuf_icon(name.c_str(), long_name.c_str(),
_icon_pixbuf->gobj(), gdl_dock_behavior);
}
} else {
- _gdl_dock_item =
+ _gdl_dock_item =
gdl_dock_item_new(name.c_str(), long_name.c_str(), gdl_dock_behavior);
}
}
-void
+void
DockItem::get_position(int& x, int& y)
-{
+{
if (getWindow()) {
getWindow()->get_position(x, y);
} else {
}
}
-void
+void
DockItem::get_size(int& width, int& height)
-{
+{
if (_window) {
_window->get_size(width, height);
} else {
void
-DockItem::resize(int width, int height)
+DockItem::resize(int width, int height)
{
if (_window)
_window->resize(width, height);
getWidget().set_size_request(width, height);
}
-void
+void
DockItem::size_request(Gtk::Requisition& requisition)
-{
+{
getWidget().size_request(requisition);
}
bool
DockItem::isFloating() const
{
- return (GTK_WIDGET(gdl_dock_object_get_toplevel(GDL_DOCK_OBJECT (_gdl_dock_item))) !=
+ return (GTK_WIDGET(gdl_dock_object_get_toplevel(GDL_DOCK_OBJECT (_gdl_dock_item))) !=
_dock.getGdlWidget());
}
void
-DockItem::addButton(Gtk::Button* button, int response_id)
+DockItem::addButton(Gtk::Button* button, int /*response_id*/)
{
// Create a button box for the response buttons if it's the first button to be added
if (!_dock_item_action_area) {
if (isIconified() || !isAttached()) {
show();
- }
+ }
// tabbed
else if (getPlacement() == CENTER) {
GTK_WIDGET (_gdl_dock_item));
if (i >= 0)
gtk_notebook_set_current_page (GTK_NOTEBOOK (_gdl_dock_item->parent), i);
- }
+ }
// always grab focus, even if we're already present
grab_focus();
Glib::SignalProxy0<void>
DockItem::signal_show()
-{
- return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
+{
+ return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
&_signal_show_proxy);
}
Glib::SignalProxy0<void>
DockItem::signal_hide()
-{
- return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
+{
+ return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
&_signal_hide_proxy);
}
Glib::SignalProxy1<void, int>
DockItem::signal_response()
{
- return Glib::SignalProxy1<void, int>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
+ return Glib::SignalProxy1<void, int>(Glib::wrap(GTK_WIDGET(_gdl_dock_item)),
&_signal_response_proxy);
}
}
void
-DockItem::_onStateChanged(State prev_state, State new_state)
+DockItem::_onStateChanged(State /*prev_state*/, State new_state)
{
_window = getWindow();
if (new_state == FLOATING_STATE && _window) {
_window->signal_hide().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onHideWindow));
- _signal_key_press_event_connection =
+ _signal_key_press_event_connection =
_window->signal_key_press_event().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onKeyPress));
}
}
bool
-DockItem::_onDeleteEvent(GdkEventAny *event)
+DockItem::_onDeleteEvent(GdkEventAny */*event*/)
{
hide();
return false;
}
const Glib::SignalProxyInfo
-DockItem::_signal_show_proxy =
+DockItem::_signal_show_proxy =
{
"show",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
};
const Glib::SignalProxyInfo
-DockItem::_signal_hide_proxy =
+DockItem::_signal_hide_proxy =
{
"hide",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
const Glib::SignalProxyInfo
-DockItem::_signal_delete_event_proxy =
+DockItem::_signal_delete_event_proxy =
{
"delete_event",
(GCallback) &_signal_delete_event_callback,
const Glib::SignalProxyInfo
-DockItem::_signal_response_proxy =
+DockItem::_signal_response_proxy =
{
"signal_response",
(GCallback) &_signal_response_callback,
};
const Glib::SignalProxyInfo
-DockItem::_signal_drag_begin_proxy =
+DockItem::_signal_drag_begin_proxy =
{
"dock-drag-begin",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
const Glib::SignalProxyInfo
-DockItem::_signal_drag_end_proxy =
+DockItem::_signal_drag_end_proxy =
{
"dock_drag_end",
(GCallback) &_signal_drag_end_callback,
const Glib::SignalProxyInfo
-DockItem::_signal_realize_proxy =
+DockItem::_signal_realize_proxy =
{
"realize",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
@@ -530,7 +530,7 @@ DockItem::_signal_delete_event_callback(GtkWidget *self, GdkEventAny *event, voi
return RType();
}
-void
+void
DockItem::_signal_response_callback(GtkWidget *self, gint response_id, void *data)
{
using namespace Gtk;
@@ -546,7 +546,7 @@ DockItem::_signal_response_callback(GtkWidget *self, gint response_id, void *dat
}
}
-void
+void
DockItem::_signal_drag_end_callback(GtkWidget *self, gboolean cancelled, void *data)
{
using namespace Gtk;
diff --git a/src/ui/widget/dock.cpp b/src/ui/widget/dock.cpp
index 1ca2580ba5326502f3f7b7be669aaafbea04fdce..563ed8e981bc21db4460e93c56a68b403c82b1da 100644 (file)
--- a/src/ui/widget/dock.cpp
+++ b/src/ui/widget/dock.cpp
namespace {
-void hideCallback(GtkObject *object, gpointer dock_ptr)
+void hideCallback(GtkObject */*object*/, gpointer dock_ptr)
{
g_return_if_fail( dock_ptr != NULL );
dock->hide();
}
-void unhideCallback(GtkObject *object, gpointer dock_ptr)
+void unhideCallback(GtkObject */*object*/, gpointer dock_ptr)
{
g_return_if_fail( dock_ptr != NULL );
_scrolled_window->set_size_request(0);
- GdlSwitcherStyle gdl_switcher_style =
- static_cast<GdlSwitcherStyle>(prefs_get_int_attribute_limited("options.dock", "switcherstyle",
+ GdlSwitcherStyle gdl_switcher_style =
+ static_cast<GdlSwitcherStyle>(prefs_get_int_attribute_limited("options.dock", "switcherstyle",
GDL_SWITCHER_STYLE_BOTH, 0, 4));
g_object_set (GDL_DOCK_OBJECT(_gdl_dock)->master,
"expand-direction", GDL_DOCK_EXPANSION_DIRECTION_DOWN,
NULL);
- GdlDockBarStyle gdl_dock_bar_style =
- static_cast<GdlDockBarStyle>(prefs_get_int_attribute_limited("options.dock", "dockbarstyle",
+ GdlDockBarStyle gdl_dock_bar_style =
+ static_cast<GdlDockBarStyle>(prefs_get_int_attribute_limited("options.dock", "dockbarstyle",
GDL_DOCK_BAR_BOTH, 0, 3));
gdl_dock_bar_set_style(_gdl_dock_bar, gdl_dock_bar_style);
g_signal_connect(_paned->gobj(), "button-release-event", G_CALLBACK(_on_paned_button_event), (void *)this);
signal_layout_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::Dock::_onLayoutChanged));
-}
+}
Dock::~Dock()
{
// FIXME: This is a hack to prevent the dock from expanding the main window, this can't be done
// initially as the paned doesn't exist.
- if (Gtk::Paned *paned = getParentPaned())
- paned->set_resize_mode(Gtk::RESIZE_QUEUE);
+ if (Gtk::Paned *paned = getParentPaned()) {
+ paned->set_resize_mode(Gtk::RESIZE_QUEUE);
+ }
}
Gtk::Widget&
Dock::isEmpty() const
{
std::list<const DockItem *>::const_iterator
- i = _dock_items.begin(),
- e = _dock_items.end();
+ i = _dock_items.begin(),
+ e = _dock_items.end();
- for (; i != e; ++i)
- if ((*i)->getState() == DockItem::DOCKED_STATE)
- return false;
+ for (; i != e; ++i) {
+ if ((*i)->getState() == DockItem::DOCKED_STATE) {
+ return false;
+ }
+ }
return true;
}
Dock::hasIconifiedItems() const
{
std::list<const DockItem *>::const_iterator
- i = _dock_items.begin(),
- e = _dock_items.end();
+ i = _dock_items.begin(),
+ e = _dock_items.end();
+
+ for (; i != e; ++i) {
+ if ((*i)->isIconified()) {
+ return true;
+ }
+ }
- for (; i != e; ++i)
- if ((*i)->isIconified())
- return true;
-
return false;
}
getWidget().hide();
}
-void
+void
Dock::show()
{
getWidget().show();
Gtk::Paned *parent_paned = getParentPaned();
if (width > 0 && height > 0) {
- prev_horizontal_position = parent_paned->get_position();
- prev_vertical_position = _paned->get_position();
+ prev_horizontal_position = parent_paned->get_position();
+ prev_vertical_position = _paned->get_position();
+
+ if (getWidget().get_width() < width)
+ parent_paned->set_position(parent_paned->get_width() - width);
- if (getWidget().get_width() < width)
- parent_paned->set_position(parent_paned->get_width() - width);
-
- if (_paned->get_position() < height)
- _paned->set_position(height);
+ if (_paned->get_position() < height)
+ _paned->set_position(height);
} else {
- parent_paned->set_position(prev_horizontal_position);
- _paned->set_position(prev_vertical_position);
+ parent_paned->set_position(prev_horizontal_position);
+ _paned->set_position(prev_vertical_position);
}
}
Glib::SignalProxy0<void>
Dock::signal_layout_changed()
{
- return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock)),
+ return Glib::SignalProxy0<void>(Glib::wrap(GTK_WIDGET(_gdl_dock)),
&_signal_layout_changed_proxy);
}
Dock::_onLayoutChanged()
{
if (isEmpty()) {
- if (hasIconifiedItems())
- _scrolled_window->set_size_request(_default_dock_bar_width);
- else
- _scrolled_window->set_size_request(_default_empty_width);
+ if (hasIconifiedItems()) {
+ _scrolled_window->set_size_request(_default_dock_bar_width);
+ } else {
+ _scrolled_window->set_size_request(_default_empty_width);
+ }
getParentPaned()->set_position(INT_MAX);
} else {
// unset any forced size requests
_paned->get_child1()->set_size_request(-1, -1);
- _scrolled_window->set_size_request(-1);
+ _scrolled_window->set_size_request(-1);
}
}
}
gboolean
-Dock::_on_paned_button_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
+Dock::_on_paned_button_event(GtkWidget */*widget*/, GdkEventButton *event, gpointer user_data)
{
if (Dock *dock = static_cast<Dock *>(user_data))
dock->_onPanedButtonEvent(event);
}
const Glib::SignalProxyInfo
-Dock::_signal_layout_changed_proxy =
+Dock::_signal_layout_changed_proxy =
{
"layout-changed",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
index f5e98face576f62534739cc6834e4c7eb5710fdc..278198b12d8edaad907302df4a66456e9dae4872 100644 (file)
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
};
// FIXME: We should always require to have both the point (for finite VPs)
-// and the direction (for infinite VPs) set. Otherwise toggling
+// and the direction (for infinite VPs) set. Otherwise toggling
// shows very unexpected behaviour.
// Later on we can maybe infer the infinite direction from the finite point
// and a suitable center of the scene. How to go in the other direction?
}
static void
-vp_drag_sel_changed(Inkscape::Selection *selection, gpointer data)
+vp_drag_sel_changed(Inkscape::Selection */*selection*/, gpointer data)
{
VPDrag *drag = (VPDrag *) data;
drag->updateDraggers ();
}
static void
-vp_drag_sel_modified (Inkscape::Selection *selection, guint flags, gpointer data)
+vp_drag_sel_modified (Inkscape::Selection */*selection*/, guint flags, gpointer data)
{
VPDrag *drag = (VPDrag *) data;
/***
}
static void
-vp_knot_moved_handler (SPKnot *knot, NR::Point const *ppointer, guint state, gpointer data)
+vp_knot_moved_handler (SPKnot */*knot*/, NR::Point const *ppointer, guint state, gpointer data)
{
VPDragger *dragger = (VPDragger *) data;
VPDrag *drag = dragger->parent;
@@ -222,7 +222,7 @@ vp_knot_moved_handler (SPKnot *knot, NR::Point const *ppointer, guint state, gpo
// ... and merge any duplicate perspectives
d_new->mergePerspectives();
-
+
// TODO: Update the new merged dragger
//d_new->updateKnotShape ();
d_new->updateTip ();
***/
void
-vp_knot_grabbed_handler (SPKnot *knot, unsigned int state, gpointer data)
+vp_knot_grabbed_handler (SPKnot */*knot*/, unsigned int state, gpointer data)
{
VPDragger *dragger = (VPDragger *) data;
VPDrag *drag = dragger->parent;
}
static void
-vp_knot_ungrabbed_handler (SPKnot *knot, guint state, gpointer data)
+vp_knot_ungrabbed_handler (SPKnot *knot, guint /*state*/, gpointer data)
{
VPDragger *dragger = (VPDragger *) data;
for (GSList *i = this->vps; i != NULL; i = i->next) {
if (*persp == *parent->document->get_persp_of_VP ((VanishingPoint *) i->data)) {
return true;
- }
+ }
}
return false;
}
}
void
-VPDragger::reshapeBoxes (NR::Point const &p, Box3D::Axis axes)
+VPDragger::reshapeBoxes (NR::Point const &p, Box3D::Axis /*axes*/)
{
Perspective3D *persp;
for (GSList const* i = this->vps; i != NULL; i = i->next) {
this->lines = g_slist_append (this->lines, line);
}
-} // namespace Box3D
-
+} // namespace Box3D
+
/*
Local Variables:
mode:c++