Inkscape Namespace Reference
Note: We must limit Java or JVM-specific code to this file and to dobinding.cpp. More...
Namespaces | |
| namespace | Algorithms |
Some STL-style algorithms. | |
| namespace | Bind |
| namespace | Debug |
Debugging utilities. | |
| namespace | Display |
Rendering-related code. | |
| namespace | Extension |
Extension support. | |
| namespace | Filters |
| namespace | GC |
Boehm-GC based garbage collector. | |
| namespace | IO |
Low-level IO code. | |
| namespace | LivePathEffect |
Live Path Effects code. | |
| namespace | NodePath |
| namespace | NSApplication |
| namespace | SVG |
| namespace | Text |
| namespace | Trace |
Tracing backend. | |
| namespace | Traits |
| namespace | UI |
User interface code. | |
| namespace | Util |
Miscellaneous supporting code. | |
| namespace | Whiteboard |
| namespace | Widgets |
| namespace | XML |
Inkscape XML tree | |
Classes | |
| class | BadURIException |
| class | UnsupportedURIException |
| class | MalformedURIException |
| struct | ColorProfileClass |
| The SPColorProfile vtable. More... | |
| struct | ColorProfile |
| Color Profile. More... | |
| class | CompositeUndoStackObserver |
| Aggregates UndoStackObservers for management and triggering in an SPDocument's undo/redo system. More... | |
| class | ConnectionPool |
| class | ConsoleOutputUndoObserver |
| class | InputDeviceImpl |
| class | IdMatcher |
| class | LinkMatcher |
| class | DeviceManagerImpl |
| class | InputDevice |
| class | DeviceManager |
| class | CanvasAxonomGrid |
| class | CanvasAxonomGridSnapper |
| struct | GridCanvasItem |
| All the variables that are tracked for a grid specific canvas item. More... | |
| struct | GridCanvasItemClass |
| class | CanvasGrid |
| class | CanvasXYGrid |
| class | CanvasXYGridSnapper |
| class | DocumentSubset |
| class | EventLog |
| struct | Event |
| class | GuideSnapper |
| Snap to guides. More... | |
| class | UnitTracker |
| struct | Application |
| struct | ApplicationClass |
| class | LayerManager |
| class | FontLister |
| This class enumerates fonts using libnrtype into reusable data stores and allows for random access to the font list. More... | |
| class | LineSnapper |
| class | CmdLineAction |
| class | MessageContext |
| A convenience class for working with MessageStacks. More... | |
| class | MessageStack |
| A class which holds a stack of displayed messages. More... | |
| class | ObjectHierarchy |
| An Inkscape::ObjectHierarchy is useful for situations where one wishes to keep a reference to an SPObject, but fall back on one of its ancestors when that object is removed. More... | |
| class | ObjectSnapper |
| class | ErrorReporter |
| class | Preferences |
| Preference storage class. More... | |
| class | ProfileManager |
| class | Rubberband |
| class | SelCue |
| class | SelectionHelper |
| class | SelectionDescriber |
| class | Selection |
| The set of selected SPObjects for a given desktop. More... | |
| class | SelTrans |
| class | SnapCandidatePoint |
| Class to store data for points which are snap candidates, either as a source or as a target. More... | |
| class | SnapCandidateItem |
| class | SnapCandidatePath |
| class | SnapPreferences |
| class | SnappedCurve |
| Class describing the result of an attempt to snap to a curve. More... | |
| class | SnappedLineSegment |
| Class describing the result of an attempt to snap to a line segment. More... | |
| class | SnappedLine |
| Class describing the result of an attempt to snap to a line. More... | |
| class | SnappedPoint |
| Class describing the result of an attempt to snap. More... | |
| class | Snapper |
| Parent for classes that can snap points to something. More... | |
| class | CSSOStringStream |
| A thin wrapper around std::ostringstream, but writing floating point numbers in the format required by CSS: `. More... | |
| class | SVGOStringStream |
| class | SVGIStringStream |
| class | SvgProfile |
| A class that contains information on which SVG profiles are marked for the object. More... | |
| class | UndoStackObserver |
| Observes changes made to the undo and redo stacks. More... | |
| class | URIReference |
| A class encapsulating a reference to a particular URI; observers can be notified when the URI comes to reference a different SPObject. More... | |
| class | URI |
| Represents an URI as per RFC 2396. More... | |
| class | FileVerb |
| A class to encompass all of the verbs which deal with file operations. More... | |
| class | EditVerb |
| A class to encompass all of the verbs which deal with edit operations. More... | |
| class | SelectionVerb |
| A class to encompass all of the verbs which deal with selection operations. More... | |
| class | LayerVerb |
| A class to encompass all of the verbs which deal with layer operations. More... | |
| class | ObjectVerb |
| A class to encompass all of the verbs which deal with operations related to objects. More... | |
| class | ContextVerb |
| A class to encompass all of the verbs which deal with operations relative to context. More... | |
| class | ZoomVerb |
| A class to encompass all of the verbs which deal with zoom operations. More... | |
| class | DialogVerb |
| A class to encompass all of the verbs which deal with dialog operations. More... | |
| class | HelpVerb |
| A class to encompass all of the verbs which deal with help operations. More... | |
| class | TutorialVerb |
| A class to encompass all of the verbs which deal with tutorial operations. More... | |
| class | TextVerb |
| A class to encompass all of the verbs which deal with text operations. More... | |
| class | EffectLastVerb |
| A class to represent the last effect issued. More... | |
| class | FitCanvasVerb |
| A class to represent the canvas fitting verbs. More... | |
| class | LockAndHideVerb |
| A class to represent the object unlocking and unhiding verbs. More... | |
| class | Verb |
| A class to represent things the user can do. More... | |
| struct | Version |
| class | FillNStroke |
| struct | compare_quark_ids |
Typedefs | |
| typedef unsigned long | MessageId |
| An integer ID which identifies a displayed message in a particular Inkscape::MessageStack. | |
| typedef std::ios_base &(* | std_oct_type )(std::ios_base &) |
Enumerations | |
| enum | { RENDERING_INTENT_UNKNOWN = 0, RENDERING_INTENT_AUTO = 1, RENDERING_INTENT_PERCEPTUAL = 2, RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3, RENDERING_INTENT_SATURATION = 4, RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5 } |
| enum | GridType { GRID_RECTANGULAR = 0, GRID_AXONOMETRIC = 1 } |
| enum | RenderMode { RENDERMODE_NORMAL, RENDERMODE_NO_FILTERS, RENDERMODE_OUTLINE, RENDERMODE_PRINT_COLORS_PREVIEW } |
| enum | { COLUMN_STRING, COLUMN_SPUNIT, N_COLUMNS } |
| enum | IconSize { ICON_SIZE_INVALID = ::GTK_ICON_SIZE_INVALID, ICON_SIZE_MENU = ::GTK_ICON_SIZE_MENU, ICON_SIZE_SMALL_TOOLBAR = ::GTK_ICON_SIZE_SMALL_TOOLBAR, ICON_SIZE_LARGE_TOOLBAR = ::GTK_ICON_SIZE_LARGE_TOOLBAR, ICON_SIZE_BUTTON = ::GTK_ICON_SIZE_BUTTON, ICON_SIZE_DND = ::GTK_ICON_SIZE_DND, ICON_SIZE_DIALOG = ::GTK_ICON_SIZE_DIALOG, ICON_SIZE_DECORATION } |
| enum | LayerRelativePosition { LPOS_ABOVE, LPOS_BELOW, LPOS_CHILD } |
| enum | MessageType { NORMAL_MESSAGE, IMMEDIATE_MESSAGE, WARNING_MESSAGE, ERROR_MESSAGE, INFORMATION_MESSAGE } |
A hint about the meaning of a message; is it an ordinary message, a message advising the user of some significant or unexpected condition, or a message indicating an unambiguous error. More... | |
| enum | SnapTargetType { SNAPTARGET_UNDEFINED = 0, SNAPTARGET_GRID, SNAPTARGET_GRID_INTERSECTION, SNAPTARGET_GUIDE, SNAPTARGET_GUIDE_INTERSECTION, SNAPTARGET_GUIDE_ORIGIN, SNAPTARGET_GRID_GUIDE_INTERSECTION, SNAPTARGET_NODE_SMOOTH, SNAPTARGET_NODE_CUSP, SNAPTARGET_LINE_MIDPOINT, SNAPTARGET_OBJECT_MIDPOINT, SNAPTARGET_ROTATION_CENTER, SNAPTARGET_HANDLE, SNAPTARGET_PATH, SNAPTARGET_PATH_INTERSECTION, SNAPTARGET_BBOX_CORNER, SNAPTARGET_BBOX_EDGE, SNAPTARGET_BBOX_EDGE_MIDPOINT, SNAPTARGET_BBOX_MIDPOINT, SNAPTARGET_PAGE_BORDER, SNAPTARGET_PAGE_CORNER, SNAPTARGET_CONVEX_HULL_CORNER, SNAPTARGET_ELLIPSE_QUADRANT_POINT, SNAPTARGET_CENTER, SNAPTARGET_CORNER, SNAPTARGET_TEXT_BASELINE, SNAPTARGET_CONSTRAINED_ANGLE, SNAPTARGET_CONSTRAINT } |
| enum | SnapSourceType { SNAPSOURCE_UNDEFINED = 0, SNAPSOURCE_BBOX_CATEGORY = 256, SNAPSOURCE_BBOX_CORNER, SNAPSOURCE_BBOX_MIDPOINT, SNAPSOURCE_BBOX_EDGE_MIDPOINT, SNAPSOURCE_NODE_CATEGORY = 512, SNAPSOURCE_NODE_SMOOTH, SNAPSOURCE_NODE_CUSP, SNAPSOURCE_LINE_MIDPOINT, SNAPSOURCE_PATH_INTERSECTION, SNAPSOURCE_CORNER, SNAPSOURCE_CONVEX_HULL_CORNER, SNAPSOURCE_ELLIPSE_QUADRANT_POINT, SNAPSOURCE_NODE_HANDLE, SNAPSOURCE_OBJECT_MIDPOINT, SNAPSOURCE_OTHER_CATEGORY = 1024, SNAPSOURCE_ROTATION_CENTER, SNAPSOURCE_CENTER, SNAPSOURCE_GUIDE, SNAPSOURCE_GUIDE_ORIGIN, SNAPSOURCE_TEXT_BASELINE, SNAPSOURCE_OTHER_HANDLE, SNAPSOURCE_GRID_PITCH } |
Functions | |
| GType | colorprofile_get_type () |
| Register ColorProfile class and return its type. | |
| SVGIStringStream & | operator>> (SVGIStringStream &istr, ConnectionPoint &cp) |
| SVGOStringStream & | operator<< (SVGOStringStream &ostr, const ConnectionPoint &cp) |
| bool | have_viable_layer (SPDesktop *desktop, MessageContext *message) |
| Check to see if the current layer is both unhidden and unlocked. | |
| bool | have_viable_layer (SPDesktop *desktop, MessageStack *message) |
| Check to see if the current layer is both unhidden and unlocked. | |
| Geom::Rect | snap_rectangular_box (SPDesktop const *desktop, SPItem *item, Geom::Point const &pt, Geom::Point const ¢er, int state) |
| Geom::Point | setup_for_drag_start (SPDesktop *desktop, SPEventContext *ec, GdkEvent *ev) |
| double | decimal_round (double const x, int const nplaces) |
| Returns x rounded to the nearest nplaces decimal places. | |
| static std::map< gint, gint > | bitVals (vals,&vals[G_N_ELEMENTS(vals)]) |
| static Glib::ustring | getBaseDeviceName (Gdk::InputSource source) |
| static std::map< Glib::ustring, Gdk::AxisUse > & | getStringToAxis () |
| std::map< Gdk::AxisUse, Glib::ustring > & | getAxisToString () |
| static std::map< Glib::ustring, Gdk::InputMode > & | getStringToMode () |
| std::map< Gdk::InputMode, Glib::ustring > & | getModeToString () |
| static void | attach_all (Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start=0) |
| static gboolean | sp_nv_read_length (gchar const *str, guint base, gdouble *val, SPUnit const **unit) |
| static gboolean | sp_nv_read_opacity (gchar const *str, guint32 *color) |
| static void | grid_canvasitem_class_init (GridCanvasItemClass *klass) |
| static void | grid_canvasitem_init (GridCanvasItem *grid) |
| static void | grid_canvasitem_destroy (GtkObject *object) |
| static void | grid_canvasitem_update (SPCanvasItem *item, Geom::Matrix const &affine, unsigned int flags) |
| static void | grid_canvasitem_render (SPCanvasItem *item, SPCanvasBuf *buf) |
| GtkType | grid_canvasitem_get_type (void) |
| static void | validateScalar (double oldVal, double *pTarget) |
| If the passed scalar is invalid (<=0), then set the widget and the scalar to use the given old value. | |
| static void | validateInt (gint oldVal, gint *pTarget) |
| If the passed int is invalid (<=0), then set the widget and the int to use the given old value. | |
| static void | grid_hline (SPCanvasBuf *buf, gint y, gint xs, gint xe, guint32 rgba) |
| static void | grid_vline (SPCanvasBuf *buf, gint x, gint ys, gint ye, guint32 rgba) |
| static void | grid_dot (SPCanvasBuf *buf, gint x, gint y, guint32 rgba) |
| GtkIconSize | getRegisteredIconSize (IconSize size) |
| SPObject * | next_layer (SPObject *root, SPObject *layer) |
| Finds the next layer under root, relative to layer in depth-first order. | |
| SPObject * | previous_layer (SPObject *root, SPObject *layer) |
| Finds the previous layer under root, relative to layer in depth-first order. | |
| SPObject * | create_layer (SPObject *root, SPObject *layer, LayerRelativePosition position) |
| Creates a new layer. | |
| void | getBBoxPoints (Geom::OptRect const bbox, std::vector< SnapCandidatePoint > *points, bool const isTarget, bool const includeCorners, bool const includeLineMidpoints, bool const includeObjectMidpoints) |
| static Inkscape::XML::Document * | loadImpl (std::string const &prefsFilename, Glib::ustring &errMsg) |
| static void | migrateDetails (Inkscape::XML::Document *from, Inkscape::XML::Document *to) |
| static void | file_add_recent (gchar const *uri) |
| double | round (double const x) |
| Returns x rounded to the nearest integer. | |
| Geom::Scale | calcScaleFactors (Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew=false) |
| template<class T > | |
| T * | createSuiteAndDocument (void(*fun)(T *&)) |
| void | queueIconPrerender (Glib::ustring const &oid, Inkscape::IconSize size=Inkscape::ICON_SIZE_BUTTON) |
Variables | |
| static pair< gint, gint > | vals [] |
| static const int | RUNAWAY_MAX = 1000 |
| static DeviceManagerImpl * | theInstance = 0 |
| static gchar const *const | grid_name [] |
| static gchar const *const | grid_svgname [] |
| static SPCanvasItemClass * | parent_class |
| static Inkscape::XML::NodeEventVector const | _repr_events |
| gchar const * | version_string |
| Full version string. | |
| static Inkscape::XML::Document * | migrateFromDoc = 0 |
| static gchar const * | undo_F_label_1 = "fill:flatcolor:1" |
| static gchar const * | undo_F_label_2 = "fill:flatcolor:2" |
| static gchar const * | undo_S_label_1 = "stroke:flatcolor:1" |
| static gchar const * | undo_S_label_2 = "stroke:flatcolor:2" |
| static gchar const * | undo_F_label = undo_F_label_1 |
| static gchar const * | undo_S_label = undo_S_label_1 |
Detailed Description
Note: We must limit Java or JVM-specific code to this file and to dobinding.cpp.
Main toolbox.
Simplified management of enumerations of svg items with UI labels.
Undo stack observer interface.
Unit Menu Widget - A drop down menu for choosing unit types.
Toolbox Widget - A detachable toolbar for buttons and other widgets.
Text Widget - A labelled text box, with optional icon or suffix, for entering arbitrary number values.
Text Widget - A labelled text box, with spin buttons and optional icon or suffix, for entering arbitrary number values.
Abstraction for different style widget operands.
Groups an HScale and a SpinButton together using the same Adjustment.
Scalar Unit Widget - A labelled text box, with spin buttons and optional icon or suffix, for entering the values of various unit types.
widget adjustable by dragging it to rotate away from a zero-change axis
Rendering Options Widget - A container for selecting rendering options.
Rendering options widget.
Random Scalar Widget - A labelled text box, with spin buttons and optional icon or suffix, for entering arbitrary number values and generating a random number from it.
Scalar Widget - A labelled text box, with spin buttons and optional icon or suffix, for entering arbitrary number values.
Inkscape Preferences dialog.
Point Widget - A labelled text box, with spin buttons and optional icon or suffix, for entering arbitrary coordinate values.
Generic Panel widget - A generic dockable container.
Panel widget.
Notebook Page Widget - A tabbed notebook page for dialogs.
Notebook page widget.
Labelled Widget - Adds a label with optional icon or suffix to another widget.
Icon Widget - General image widget (including SVG icons).
Icon Widget.
HandleBox Widget - Adds a detachment handle to another widget.
A custom wrapper around gdl-dock-item.
A custom Inkscape wrapper around gdl_dock_item.
Simplified management of enumerations in the UI as combobox.
Button and CheckButton widgets.
Very basic interface for classes that control attributes.
empty file left in repo for current desktop.h
Empty file left in repo for current desktop.cpp.
Dialog for modifying guidelines.
Find dialog.
Glyph selector dialog.
A generic interface for plugging different autotracers into Inkscape.
Inkscape::SVG::PathString - builder for SVG path strings.
Whiteboard session manager.
Session file selector widget.
Whiteboard session manager XML node manipulation / retrieval utilities.
Whiteboard session manager XML node tracking facility.
Inkscape::Whiteboard::MessageVerifier -- performs basic XMPP-related validity checks on incoming messages.
Message generation utilities.
Whiteboard session manager Message tags.
Whiteboard message queue.
Whiteboard message queue and queue handler functions Node for storing messages in message queues.
Aggregates individual serialized XML::Events into larger packages for more efficient delivery.
Inkscape::Whiteboard::KeyNodeTable - structure for lookup of values from keys and vice versa.
Whiteboard invitation confirmation dialog -- quick subclass of Gtk::MessageDialog.
Inkscape::Whiteboard::InkboardDocument - Inkboard document implementation.
Choose Desktop dialog.
Whiteboard session manager Definitions.
Xslt-enabled input and output streams.
XSL Transforming input and output classes.
This should be the only way that we provide sources/sinks to any input/output stream.
Our base String stream classes.
Our base basic stream classes.
Our base input/output stream classes.
Zlib-enabled input and output streams.
Base64-enabled input and output streams.
Inkscape Scripting container.
This is a simple mechanism to bind Inkscape to Java, and thence to all of the nice things that can be layered upon that.
OpenDocument <drawing> input and output.
Main Inkscape namespace.
Inkscape::ConsoleOutputUndoObserver - observer for tracing calls to sp_document_undo, sp_document_redo, sp_document_maybe_done.
Aggregates undo stack observers for management and triggering in SPDocument.
Aggregates undo stack observers for convenient management and triggering in SPDocument.
It should be hidden from javabind.h
This file is mostly about getting things up and running, and providing the basic C-to-Java hooks.
dobinding.cpp will have the rote and repetitious class-by-class binding
Heavily inspired by Inkscape::XML::CompositeNodeObserver.
Authors: David Yip <yipdw@rose-hulman.edu>
Copyright (c) 2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: David Yip <yipdw@alumni.rose-hulman.edu>
Copyright (c) 2006 Authors
Released under GNU GPL, see the file 'COPYING' for more information
This namespace contains all code internal to Inkscape.
A simple log for maintaining a history of commited, undone and redone events along with their type. It implements the UndoStackObserver and should be registered with a CompositeUndoStackObserver for each document. The event log is then notified on all commit, undo and redo events and will store a representation of them in an internal Gtk::TreeStore.
Consecutive events of the same type are grouped with the first event as a parent and following as its children.
If a Gtk::TreeView is connected to the event log, the TreeView's selection and its nodes expanded/collapsed state will be updated as events are commited, undone and redone. Whenever this happens, the event log will block the TreeView's callbacks to prevent circular updates.
Author: Gustav Broberg <broberg@kth.se>
Copyright (c) 2006, 2007 Authors
Released under GNU GPL, read the file 'COPYING' for more information
This is an an entry in the extensions mechanism to begin to enable the inputting and outputting of OpenDocument Format (ODF) files from within Inkscape. Although the initial implementations will be very lossy do to the differences in the models of SVG and ODF, they will hopefully improve greatly with time. People should consider this to be a framework that can be continously upgraded for ever improving fidelity. Potential developers should especially look in preprocess() and writeTree() to see how the SVG tree is scanned, read, translated, and then written to ODF.
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
Authors: Bob Jamison
Copyright (C) 2006, 2007 Bob Jamison
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This is an an entry in the extensions mechanism to begin to enable the inputting and outputting of OpenDocument Format (ODF) files from within Inkscape. Although the initial implementations will be very lossy do to the differences in the models of SVG and ODF, they will hopefully improve greatly with time.
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
Authors: Bob Jamison
Copyright (C) 2006 Bob Jamison
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Authors: Bob Jamison
Copyright (C) 2007-2008 Bob Jamison
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004-2008 Bob Jamison
Released under GNU GPL, read the file 'COPYING' for more information
This class allows easy encoding and decoding of Base64 data with a stream interface, hiding the implementation from the user.
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
This is a thin wrapper of libz calls, in order to provide a simple interface to our developers for gzip input and output.
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
These are is directly inherited from iostreams, and includes any extra functionality that we might need.
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
We implement these to be based on Glib::ustring
Authors: Bob Jamison <rjamison@titan.com>
Copyright (C) 2004 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Bob Jamison <ishmalius@gmail.com>
Copyright (C) 2004-2008 Inkscape.org
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Dale Harvey <harveyd@gmail.com>
Copyright (c) 2006 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Dale Harvey <harveyd@gmail.com>
Copyright (C) 2006 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: David Yip <yipdw@rose-hulman.edu>
Copyright (c) 2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Dale Harvey <harveyd@gmail.com>
Copyright (c) 2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Bob Jamison
Copyright (c) 2005 Authors
Authors: David Yip <yipdw@rose-hulman.edu> Jonas Collaros, Stephen Montgomery
Copyright (c) 2004-2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: David Yip <yipdw@alumni.rose-hulman.edu>
Copyright (c) 2006 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: David Yip <yipdw@rose-hulman.edu>
Released under GNU GPL, read the file 'COPYING' for more information
Authors: David Yip <yipdw@rose-hulman.edu> Bob Jamison (Pedro port)
Copyright (c) 2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Copyright 2007 MenTaLguY <mental@rydia.net> Copyright 2008 Jasper van de Gronde <th.v.d.gronde@hccnet.nl>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See the file COPYING for details.
Authors: Bob Jamison <rjamison@earthlink.net>
Copyright (C) 2004-2006 Bob Jamison
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Bryce W. Harrington <bryce@bryceharrington.org> Johan Engelen <goejendaagh@zonnet.nl>
Copyright (C) 2004-2006 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Andrius R. <knutux@gmail.com> Johan Engelen
Copyright (C) 2006-2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information
Authors: Nicholas Bishop <nicholasbishop@gmail.com> Rodrigo Kumpera <kumpera@gmail.com>
Copyright (C) 2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: buliabyak@gmail.com
Copyright (C) 2005 author
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Nicholas Bishop <nicholasbishop@gmail.com> Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
Copyright (C) 2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Gustav Broberg <broberg@kth.se>
Copyright (C) 2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
This work really doesn't amount to much more than a convenience constructor for Gtk::HandleBox. Maybe this could be contributed back to Gtkmm, as Gtkmm provides several convenience constructors for other widgets as well.
Author: Derek P. Moore <derekm@hackunix.org>
Copyright (C) 2004 Derek P. Moore
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2004 Bryce Harrington based on work by Lauris Kaplinski in 2002 released under GPL
Released under GNU GPL. Read the file 'COPYING' for more information
Author: Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2004 Bryce Harrington
Released under GNU GPL. Read the file 'COPYING' for more information
Authors: Carl Hetherington <inkscape@carlh.net> Derek P. Moore <derekm@hackunix.org>
Copyright (C) 2004 Carl Hetherington
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2004 Bryce Harrington
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Bryce Harrington <bryce@bryceharrington.org> Jon A. Cruz <jon@joncruz.org> Gustav Broberg <broberg@kth.se>
Copyright (C) 2004 Bryce Harrington Copyright (C) 2005 Jon A. Cruz Copyright (C) 2007 Gustav Broberg
Released under GNU GPL. Read the file 'COPYING' for more information
Authors: Bryce Harrington <bryce@bryceharrington.org> Jon A. Cruz <jon@joncruz.org>
Copyright (C) 2004 Bryce Harrington Copyright (C) 2005 Jon A. Cruz
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Johan Engelen <j.b.c.engelen@utwente.nl> Carl Hetherington <inkscape@carlh.net> Derek P. Moore <derekm@hackunix.org> Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2007 Authors Copyright (C) 2004 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Marco Scholten Bruno Dilly <bruno.dilly@gmail.com>
Copyright (C) 2004, 2006, 2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
It adds an extra number called "startseed", that is not UI edittable, but should be put in SVG. This does NOT generate a random number, but provides merely the saving of the startseed value.
Authors: Carl Hetherington <inkscape@carlh.net> Derek P. Moore <derekm@hackunix.org> Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2004 Carl Hetherington
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
Copyright (C) 2007 Author
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
Copyright (C) 2007 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Kees Cook <kees@outflux.net>
Copyright (C) 2007 Kees Cook Copyright (C) 2004 Bryce Harrington
Released under GNU GPL. Read the file 'COPYING' for more information
Author: Kees Cook <kees@outflux.net>
Copyright (C) 2007 Kees Cook Copyright (C) 2004 Bryce Harrington
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: buliabyak@gmail.com
Copyright (C) 2007 authors
Released under GNU GPL. Read the file 'COPYING' for more information.
A ScalarUnit is a control for entering, viewing, or manipulating numbers with units. This differs from ordinary numbers like 2 or 3.14 because the number portion of a scalar *only* has meaning when considered with its unit type. For instance, 12 m and 12 in have very different actual values, but 1 m and 100 cm have the same value. The ScalarUnit allows us to abstract the presentation of the scalar to the user from the internal representations used by the program.
Authors: Bryce Harrington <bryce@bryceharrington.org> Derek P. Moore <derekm@hackunix.org> buliabyak@gmail.com
Copyright (C) 2004-2005 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Bryce Harrington <bryce@bryceharrington.org> Derek P. Moore <derekm@hackunix.org> buliabyak@gmail.com
Copyright (C) 2004-2005 Authors
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Carl Hetherington <inkscape@carlh.net> Derek P. Moore <derekm@hackunix.org> Bryce Harrington <bryce@bryceharrington.org>
Copyright (C) 2004 Carl Hetherington
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Nicholas Bishop <nicholasbishop@gmail.com> Felipe C. da S. Sanches <juca@members.fsf.org>
Copyright (C) 2007 Author
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Nicholas Bishop <nicholasbishop@gmail.com>
Copyright (C) 2007 Author
Released under GNU GPL. Read the file 'COPYING' for more information.
Copyright (C) 2007 MenTaLguY <mental@rydia.net>
Released under GNU GPL. Read the file 'COPYING' for more information.
Authors: Carl Hetherington <inkscape@carlh.net> Maximilian Albert <maximilian.albert@gmail.com>
Copyright (C) 2004 Carl Hetherington
Released under GNU GPL. Read the file 'COPYING' for more information.
Author: Derek P. Moore <derekm@hackunix.org>
Copyright (C) 2004 Derek P. Moore
Released under GNU GPL. Read the file 'COPYING' for more information.
Observes undo, redo, and undo log commit events.
Authors: David Yip <yipdw@rose-hulman.edu>
Copyright (c) 2005 Authors
Released under GNU GPL, read the file 'COPYING' for more information
Authors: Lauris Kaplinski <lauris@kaplinski.com> Frank Felfe <innerspace@iname.com> Jon A. Cruz <jon@joncruz.org>
Copyright (C) 1999-2002 Authors Copyright (C) 2001-2002 Ximian, Inc.
Released under GNU GPL, read the file 'COPYING' for more information
Typedef Documentation
| typedef unsigned long Inkscape::MessageId |
An integer ID which identifies a displayed message in a particular Inkscape::MessageStack.
- See also:
- Inkscape::MessageStack
| typedef std::ios_base &(* Inkscape::std_oct_type)(std::ios_base &) |
Definition at line 9 of file css-ostringstream.h.
Enumeration Type Documentation
| anonymous enum |
Definition at line 20 of file unit-tracker.cpp.
{
COLUMN_STRING,
COLUMN_SPUNIT,
N_COLUMNS
};
| anonymous enum |
- Enumerator:
RENDERING_INTENT_UNKNOWN RENDERING_INTENT_AUTO RENDERING_INTENT_PERCEPTUAL RENDERING_INTENT_RELATIVE_COLORIMETRIC RENDERING_INTENT_SATURATION RENDERING_INTENT_ABSOLUTE_COLORIMETRIC
Definition at line 17 of file color-profile.h.
| enum Inkscape::GridType |
Definition at line 34 of file canvas-grid.h.
{
GRID_RECTANGULAR = 0,
GRID_AXONOMETRIC = 1
};
| enum Inkscape::IconSize |
- Enumerator:
ICON_SIZE_INVALID ICON_SIZE_MENU ICON_SIZE_SMALL_TOOLBAR ICON_SIZE_LARGE_TOOLBAR ICON_SIZE_BUTTON ICON_SIZE_DND ICON_SIZE_DIALOG ICON_SIZE_DECORATION
Definition at line 21 of file icon-size.h.
{
ICON_SIZE_INVALID = ::GTK_ICON_SIZE_INVALID,
ICON_SIZE_MENU = ::GTK_ICON_SIZE_MENU,
ICON_SIZE_SMALL_TOOLBAR = ::GTK_ICON_SIZE_SMALL_TOOLBAR,
ICON_SIZE_LARGE_TOOLBAR = ::GTK_ICON_SIZE_LARGE_TOOLBAR,
ICON_SIZE_BUTTON = ::GTK_ICON_SIZE_BUTTON,
ICON_SIZE_DND = ::GTK_ICON_SIZE_DND,
ICON_SIZE_DIALOG = ::GTK_ICON_SIZE_DIALOG,
ICON_SIZE_DECORATION
};
Definition at line 19 of file layer-fns.h.
{
LPOS_ABOVE,
LPOS_BELOW,
LPOS_CHILD,
};
A hint about the meaning of a message; is it an ordinary message, a message advising the user of some significant or unexpected condition, or a message indicating an unambiguous error.
Definition at line 22 of file message.h.
{
NORMAL_MESSAGE,
IMMEDIATE_MESSAGE,
WARNING_MESSAGE,
ERROR_MESSAGE,
INFORMATION_MESSAGE
};
| enum Inkscape::RenderMode |
- Enumerator:
RENDERMODE_NORMAL RENDERMODE_NO_FILTERS RENDERMODE_OUTLINE RENDERMODE_PRINT_COLORS_PREVIEW
Definition at line 12 of file rendermode.h.
{
RENDERMODE_NORMAL,
RENDERMODE_NO_FILTERS,
RENDERMODE_OUTLINE,
RENDERMODE_PRINT_COLORS_PREVIEW
};
- Enumerator:
Definition at line 49 of file snap-enums.h.
{
SNAPSOURCE_UNDEFINED = 0,
//-------------------------------------------------------------------
// Bbox points can be located at the edge of the stroke (for visual bboxes); they will therefore not snap
// to nodes because these are always located at the center of the stroke
SNAPSOURCE_BBOX_CATEGORY = 256, // will be used as a flag and must therefore be a power of two
SNAPSOURCE_BBOX_CORNER,
SNAPSOURCE_BBOX_MIDPOINT,
SNAPSOURCE_BBOX_EDGE_MIDPOINT,
//-------------------------------------------------------------------
// For the same reason, nodes will not snap to bbox points
SNAPSOURCE_NODE_CATEGORY = 512, // will be used as a flag and must therefore be a power of two
SNAPSOURCE_NODE_SMOOTH, // Symmetrical nodes are also considered to be smooth; there's no dedicated type for symm. nodes
SNAPSOURCE_NODE_CUSP,
SNAPSOURCE_LINE_MIDPOINT,
SNAPSOURCE_PATH_INTERSECTION,
SNAPSOURCE_CORNER, // of image or of rectangle
SNAPSOURCE_CONVEX_HULL_CORNER,
SNAPSOURCE_ELLIPSE_QUADRANT_POINT,
SNAPSOURCE_NODE_HANDLE, // eg. nodes in the path editor, handles of stars or rectangles, etc. (tied to a stroke)
SNAPSOURCE_OBJECT_MIDPOINT,
//-------------------------------------------------------------------
// Other points (e.g. guides, gradient knots) will snap to both bounding boxes and nodes
SNAPSOURCE_OTHER_CATEGORY = 1024, // will be used as a flag and must therefore be a power of two
SNAPSOURCE_ROTATION_CENTER,
SNAPSOURCE_CENTER, // of ellipse
SNAPSOURCE_GUIDE,
SNAPSOURCE_GUIDE_ORIGIN,
SNAPSOURCE_TEXT_BASELINE,
SNAPSOURCE_OTHER_HANDLE, // eg. the handle of a gradient of a connector (ie not being tied to a stroke)
SNAPSOURCE_GRID_PITCH, // eg. when pasting or alt-dragging in the selector tool; not realy a snap source
};
- Enumerator:
Definition at line 18 of file snap-enums.h.
{
SNAPTARGET_UNDEFINED = 0,
SNAPTARGET_GRID,
SNAPTARGET_GRID_INTERSECTION,
SNAPTARGET_GUIDE,
SNAPTARGET_GUIDE_INTERSECTION,
SNAPTARGET_GUIDE_ORIGIN,
SNAPTARGET_GRID_GUIDE_INTERSECTION,
SNAPTARGET_NODE_SMOOTH,
SNAPTARGET_NODE_CUSP,
SNAPTARGET_LINE_MIDPOINT,
SNAPTARGET_OBJECT_MIDPOINT,
SNAPTARGET_ROTATION_CENTER,
SNAPTARGET_HANDLE,
SNAPTARGET_PATH,
SNAPTARGET_PATH_INTERSECTION,
SNAPTARGET_BBOX_CORNER,
SNAPTARGET_BBOX_EDGE,
SNAPTARGET_BBOX_EDGE_MIDPOINT,
SNAPTARGET_BBOX_MIDPOINT,
SNAPTARGET_PAGE_BORDER,
SNAPTARGET_PAGE_CORNER,
SNAPTARGET_CONVEX_HULL_CORNER,
SNAPTARGET_ELLIPSE_QUADRANT_POINT,
SNAPTARGET_CENTER, // of ellipse
SNAPTARGET_CORNER, // of image or of rectangle
SNAPTARGET_TEXT_BASELINE,
SNAPTARGET_CONSTRAINED_ANGLE,
SNAPTARGET_CONSTRAINT
};
Function Documentation
| static void Inkscape::attach_all | ( | Gtk::Table & | table, | |
| Gtk::Widget const *const | arr[], | |||
| unsigned | size, | |||
| int | start = 0 | |||
| ) | [inline, static] |
Definition at line 395 of file canvas-grid.cpp.
References FILL, Barcode::Code39Ext::i, i18n::label, polyhedron_3d::r, render_alphabetsoup_config::space, SPACE_SIZE_X, SPACE_SIZE_Y, and scour::start.
Referenced by Inkscape::CanvasXYGrid::newSpecificWidget(), and Inkscape::CanvasAxonomGrid::newSpecificWidget().
{
for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2) {
if (arr[i] && arr[i+1]) {
table.attach (const_cast<Gtk::Widget&>(*arr[i]), 1, 2, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 2, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
} else {
if (arr[i+1]) {
table.attach (const_cast<Gtk::Widget&>(*arr[i+1]), 1, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
} else if (arr[i]) {
Gtk::Label& label = reinterpret_cast<Gtk::Label&> (const_cast<Gtk::Widget&>(*arr[i]));
label.set_alignment (0.0);
table.attach (label, 0, 3, r, r+1,
Gtk::FILL|Gtk::EXPAND, (Gtk::AttachOptions)0,0,0);
} else {
Gtk::HBox *space = manage (new Gtk::HBox);
space->set_size_request (SPACE_SIZE_X, SPACE_SIZE_Y);
table.attach (*space, 0, 1, r, r+1,
(Gtk::AttachOptions)0, (Gtk::AttachOptions)0,0,0);
}
}
++r;
}
}
| static std::map<gint, gint> Inkscape::bitVals | ( | vals | , | |
| & | vals[G_N_ELEMENTS(vals)] | |||
| ) | [static] |
Referenced by Inkscape::DeviceManagerImpl::addAxis(), and Inkscape::DeviceManagerImpl::addButton().
| Geom::Scale Inkscape::calcScaleFactors | ( | Geom::Point const & | initial_point, | |
| Geom::Point const & | new_point, | |||
| Geom::Point const & | origin, | |||
| bool const | skew = false | |||
| ) |
Definition at line 1576 of file seltrans.cpp.
References addnodes::e, Barcode::Code39Ext::i, pathalongpath::offset(), and dxf_input::scale.
Referenced by Inkscape::SelTrans::scaleRequest(), Inkscape::SelTrans::skewRequest(), and Inkscape::SelTrans::stretchRequest().
{
// Work out the new scale factors for the bbox
Geom::Point const initial_delta = initial_point - origin;
Geom::Point const new_delta = new_point - origin;
Geom::Point const offset = new_point - initial_point;
Geom::Scale scale(1, 1);
for ( unsigned int i = 0 ; i < 2 ; i++ ) {
if ( fabs(initial_delta[i]) > 1e-6 ) {
if (skew) {
scale[i] = offset[1-i] / initial_delta[i];
} else {
scale[i] = new_delta[i] / initial_delta[i];
}
}
}
return scale;
}
| GType Inkscape::colorprofile_get_type | ( | ) |
Register ColorProfile class and return its type.
Definition at line 116 of file color-profile.cpp.
References Inkscape::ColorProfile::getType().
{
return ColorProfile::getType();
}
| SPObject * Inkscape::create_layer | ( | SPObject * | root, | |
| SPObject * | layer, | |||
| LayerRelativePosition | position | |||
| ) |
Creates a new layer.
Advances to the next layer id indicated by the string "layerNN", then creates a new group object of that id with attribute inkscape:groupmode='layer', and finally appends the new group object to root after object layer.
- Precondition:
- root should be either layer or an ancestor of it
Referenced by document_interface_layer_new(), Inkscape::LayerVerb::perform(), and Inkscape::UI::Dialogs::LayerPropertiesDialog::Create::perform().
| T* Inkscape::createSuiteAndDocument | ( | void(*)(T *&) | fun | ) |
Definition at line 23 of file test-helpers.h.
References Inkscape::Extension::Dbus::init(), inkscape_get_instance(), inkscape_get_type(), NULL, sp_document_new(), sp_document_unref(), cxxtestgen::suite, and TRUE.
{
T* suite = 0;
g_type_init();
Inkscape::GC::init();
if ( !inkscape_get_instance() )
{
// Create the global inkscape object.
static_cast<void>(g_object_new(inkscape_get_type(), NULL));
}
SPDocument* tmp = sp_document_new( NULL, TRUE, true );
if ( tmp ) {
fun( suite );
if ( suite )
{
suite->_doc = tmp;
}
else
{
sp_document_unref( tmp );
}
}
return suite;
}
Returns x rounded to the nearest nplaces decimal places.
Implemented in terms of Inkscape::round, i.e. we make no guarantees as to what happens if x is half way between two rounded numbers. Add a note to the documentation if you care which candidate is chosen for such case (round towards -infinity, +infinity, 0, or "even").
Note: nplaces is the number of decimal places without using scientific (e) notation, not the number of significant figures. This function may not be suitable for values of x whose magnitude is so far from 1 that one would want to use scientific (e) notation.
The current implementation happens to allow nplaces to be negative: e.g. nplaces=-2 means rounding to a multiple of 100. May or may not be useful.
Definition at line 25 of file decimal-round.h.
References Geom::pow(), and round().
Referenced by ColorRGBA::getIntValue(), and NR::Point::round().
{
double const multiplier = std::pow(10.0, nplaces);
return Inkscape::round( x * multiplier ) / multiplier;
}
| static void Inkscape::file_add_recent | ( | gchar const * | uri | ) | [static] |
Definition at line 38 of file preferences.cpp.
References NULL.
Referenced by Inkscape::Preferences::migrate().
{
if (!uri) {
g_warning("file_add_recent: uri == NULL");
} else {
GtkRecentManager *recent = gtk_recent_manager_get_default();
gchar *fn = g_filename_from_utf8(uri, -1, NULL, NULL, NULL);
if (fn) {
if (g_file_test(fn, G_FILE_TEST_EXISTS)) {
gchar *uriToAdd = g_filename_to_uri(fn, NULL, NULL);
if (uriToAdd) {
gtk_recent_manager_add_item(recent, uriToAdd);
g_free(uriToAdd);
}
}
g_free(fn);
}
}
}
| std::map<Gdk::AxisUse, Glib::ustring>& Inkscape::getAxisToString | ( | ) |
Definition at line 89 of file device-manager.cpp.
References getStringToAxis(), and Inkscape::Extension::Dbus::init().
Referenced by Inkscape::DeviceManagerImpl::saveConfig().
{
static bool init = false;
static std::map<Gdk::AxisUse, Glib::ustring> mapping;
if (!init) {
init = true;
for (std::map<Glib::ustring, Gdk::AxisUse>::iterator it = getStringToAxis().begin(); it != getStringToAxis().end(); ++it) {
mapping.insert(std::make_pair(it->second, it->first));
}
}
return mapping;
}
| static Glib::ustring Inkscape::getBaseDeviceName | ( | Gdk::InputSource | source | ) | [static] |
Definition at line 50 of file device-manager.cpp.
References polyhedron_3d::name.
Referenced by Inkscape::InputDeviceImpl::createId().
{
Glib::ustring name;
switch (source) {
case GDK_SOURCE_MOUSE:
name ="pointer";
break;
case GDK_SOURCE_PEN:
name ="pen";
break;
case GDK_SOURCE_ERASER:
name ="eraser";
break;
case GDK_SOURCE_CURSOR:
name ="cursor";
break;
default:
name = "tablet";
}
return name;
}
| void Inkscape::getBBoxPoints | ( | Geom::OptRect const | bbox, | |
| std::vector< SnapCandidatePoint > * | points, | |||
| bool const | isTarget, | |||
| bool const | includeCorners, | |||
| bool const | includeLineMidpoints, | |||
| bool const | includeObjectMidpoints | |||
| ) |
Definition at line 784 of file object-snapper.cpp.
References SNAPSOURCE_BBOX_EDGE_MIDPOINT, and SNAPTARGET_BBOX_EDGE_MIDPOINT.
Referenced by Inkscape::ObjectSnapper::_collectNodes(), and Inkscape::SelTrans::grab().
{
if (bbox) {
// collect the corners of the bounding box
for ( unsigned k = 0 ; k < 4 ; k++ ) {
if (includeCorners) {
points->push_back(Inkscape::SnapCandidatePoint(bbox->corner(k), Inkscape::SNAPSOURCE_BBOX_CORNER, 0, Inkscape::SNAPTARGET_BBOX_CORNER, *bbox));
}
// optionally, collect the midpoints of the bounding box's edges too
if (includeLineMidpoints) {
points->push_back(Inkscape::SnapCandidatePoint((bbox->corner(k) + bbox->corner((k+1) % 4))/2, Inkscape::SNAPSOURCE_BBOX_EDGE_MIDPOINT, 0, Inkscape::SNAPTARGET_BBOX_EDGE_MIDPOINT, *bbox));
}
}
if (includeObjectMidpoints) {
points->push_back(Inkscape::SnapCandidatePoint(bbox->midpoint(), Inkscape::SNAPSOURCE_BBOX_MIDPOINT, 0, Inkscape::SNAPTARGET_BBOX_MIDPOINT, *bbox));
}
}
}
| std::map<Gdk::InputMode, Glib::ustring>& Inkscape::getModeToString | ( | ) |
Definition at line 115 of file device-manager.cpp.
References getStringToMode(), and Inkscape::Extension::Dbus::init().
Referenced by Inkscape::DeviceManagerImpl::saveConfig().
{
static bool init = false;
static std::map<Gdk::InputMode, Glib::ustring> mapping;
if (!init) {
init = true;
for (std::map<Glib::ustring, Gdk::InputMode>::iterator it = getStringToMode().begin(); it != getStringToMode().end(); ++it) {
mapping.insert(std::make_pair(it->second, it->first));
}
}
return mapping;
}
| GtkIconSize Inkscape::getRegisteredIconSize | ( | Inkscape::IconSize | size | ) |
Definition at line 695 of file icon.cpp.
References CLAMP, ICON_SIZE_DECORATION, ICON_SIZE_MENU, and injectCustomSize().
Referenced by Inkscape::UI::Widget::Panel::_init(), ink_radio_action_new(), ink_toggle_action_new(), Inkscape::UI::Widget::Panel::prep(), renderup(), and sp_icon_get_icon().
{
GtkIconSize other = GTK_ICON_SIZE_MENU;
injectCustomSize();
size = CLAMP( size, Inkscape::ICON_SIZE_MENU, Inkscape::ICON_SIZE_DECORATION );
if ( size == Inkscape::ICON_SIZE_DECORATION ) {
other = gtk_icon_size_from_name("inkscape-decoration");
} else {
other = static_cast<GtkIconSize>(size);
}
return other;
}
| static std::map<Glib::ustring, Gdk::AxisUse>& Inkscape::getStringToAxis | ( | ) | [static] |
Definition at line 72 of file device-manager.cpp.
References Inkscape::Extension::Dbus::init().
Referenced by getAxisToString(), and Inkscape::DeviceManagerImpl::loadConfig().
{
static bool init = false;
static std::map<Glib::ustring, Gdk::AxisUse> mapping;
if (!init) {
init = true;
mapping["ignore"] = Gdk::AXIS_IGNORE;
mapping["x"] = Gdk::AXIS_X;
mapping["y"] = Gdk::AXIS_Y;
mapping["pressure"] = Gdk::AXIS_PRESSURE;
mapping["xtilt"] = Gdk::AXIS_XTILT;
mapping["ytilt"] = Gdk::AXIS_YTILT;
mapping["wheel"] = Gdk::AXIS_WHEEL;
}
return mapping;
}
| static std::map<Glib::ustring, Gdk::InputMode>& Inkscape::getStringToMode | ( | ) | [static] |
Definition at line 102 of file device-manager.cpp.
References Inkscape::Extension::Dbus::init().
Referenced by getModeToString(), and Inkscape::DeviceManagerImpl::loadConfig().
{
static bool init = false;
static std::map<Glib::ustring, Gdk::InputMode> mapping;
if (!init) {
init = true;
mapping["disabled"] = Gdk::MODE_DISABLED;
mapping["screen"] = Gdk::MODE_SCREEN;
mapping["window"] = Gdk::MODE_WINDOW;
}
return mapping;
}
| static void Inkscape::grid_canvasitem_class_init | ( | GridCanvasItemClass * | klass | ) | [static] |
Definition at line 80 of file canvas-grid.cpp.
References parent_class, _SPCanvasItemClass::render, sp_canvas_item_get_type(), and _SPCanvasItemClass::update.
{
GtkObjectClass *object_class;
SPCanvasItemClass *item_class;
object_class = (GtkObjectClass *) klass;
item_class = (SPCanvasItemClass *) klass;
parent_class = (SPCanvasItemClass*)gtk_type_class (sp_canvas_item_get_type ());
object_class->destroy = grid_canvasitem_destroy;
item_class->update = grid_canvasitem_update;
item_class->render = grid_canvasitem_render;
}
| static void Inkscape::grid_canvasitem_destroy | ( | GtkObject * | object | ) | [static] |
Definition at line 103 of file canvas-grid.cpp.
References INKSCAPE_IS_GRID_CANVASITEM, NULL, and parent_class.
{
g_return_if_fail (object != NULL);
g_return_if_fail (INKSCAPE_IS_GRID_CANVASITEM (object));
if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
| GtkType Inkscape::grid_canvasitem_get_type | ( | void | ) |
| static void Inkscape::grid_canvasitem_init | ( | GridCanvasItem * | grid | ) | [static] |
Definition at line 97 of file canvas-grid.cpp.
References Inkscape::GridCanvasItem::grid.
{
griditem->grid = NULL;
}
| static void Inkscape::grid_canvasitem_render | ( | SPCanvasItem * | item, | |
| SPCanvasBuf * | buf | |||
| ) | [static] |
Definition at line 115 of file canvas-grid.cpp.
References Inkscape::GridCanvasItem::grid, INKSCAPE_GRID_CANVASITEM, Inkscape::CanvasGrid::isVisible(), Inkscape::CanvasGrid::Render(), and sp_canvas_prepare_buffer().
{
GridCanvasItem *gridcanvasitem = INKSCAPE_GRID_CANVASITEM (item);
if ( gridcanvasitem->grid && gridcanvasitem->grid->isVisible() ) {
sp_canvas_prepare_buffer (buf);
gridcanvasitem->grid->Render(buf);
}
}
| static void Inkscape::grid_canvasitem_update | ( | SPCanvasItem * | item, | |
| Geom::Matrix const & | affine, | |||
| unsigned int | flags | |||
| ) | [static] |
Definition at line 126 of file canvas-grid.cpp.
References SPCanvasItem::canvas, Inkscape::GridCanvasItem::grid, INKSCAPE_GRID_CANVASITEM, parent_class, sp_canvas_request_redraw(), Inkscape::CanvasGrid::Update(), _SPCanvasItemClass::update, SPCanvasItem::x1, SPCanvasItem::x2, SPCanvasItem::y1, and SPCanvasItem::y2.
{
GridCanvasItem *gridcanvasitem = INKSCAPE_GRID_CANVASITEM (item);
if (parent_class->update)
(* parent_class->update) (item, affine, flags);
if (gridcanvasitem->grid) {
gridcanvasitem->grid->Update(affine, flags);
sp_canvas_request_redraw (item->canvas,
-1000000, -1000000,
1000000, 1000000);
item->x1 = item->y1 = -1000000;
item->x2 = item->y2 = 1000000;
}
}
| static void Inkscape::grid_dot | ( | SPCanvasBuf * | buf, | |
| gint | x, | |||
| gint | y, | |||
| guint32 | rgba | |||
| ) | [static] |
Definition at line 877 of file canvas-grid.cpp.
References org::w3c::dom::svg::a, b, SPCanvasBuf::buf, SPCanvasBuf::buf_rowstride, NR_COMPOSEN11_1111, NR_RGBA32_A, NR_RGBA32_B, NR_RGBA32_G, NR_RGBA32_R, uniconv-ext::p, polyhedron_3d::r, SPCanvasBuf::rect, NRRectL::x0, and NRRectL::y0.
Referenced by Inkscape::CanvasXYGrid::Render().
{
if ( (y >= buf->rect.y0) && (y < buf->rect.y1)
&& (x >= buf->rect.x0) && (x < buf->rect.x1) ) {
guint r, g, b, a;
guchar *p;
r = NR_RGBA32_R (rgba);
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
}
}
| static void Inkscape::grid_hline | ( | SPCanvasBuf * | buf, | |
| gint | y, | |||
| gint | xs, | |||
| gint | xe, | |||
| guint32 | rgba | |||
| ) | [static] |
Definition at line 831 of file canvas-grid.cpp.
References org::w3c::dom::svg::a, b, SPCanvasBuf::buf, SPCanvasBuf::buf_rowstride, MAX, MIN, NR_COMPOSEN11_1111, NR_RGBA32_A, NR_RGBA32_B, NR_RGBA32_G, NR_RGBA32_R, uniconv-ext::p, polyhedron_3d::r, SPCanvasBuf::rect, voronoi::x, NRRectL::x0, NRRectL::x1, and NRRectL::y0.
Referenced by Inkscape::CanvasXYGrid::Render().
{
if ((y >= buf->rect.y0) && (y < buf->rect.y1)) {
guint r, g, b, a;
gint x0, x1, x;
guchar *p;
r = NR_RGBA32_R (rgba);
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
x0 = MAX (buf->rect.x0, xs);
x1 = MIN (buf->rect.x1, xe + 1);
p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride + (x0 - buf->rect.x0) * 4;
for (x = x0; x < x1; x++) {
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
p += 4;
}
}
}
| static void Inkscape::grid_vline | ( | SPCanvasBuf * | buf, | |
| gint | x, | |||
| gint | ys, | |||
| gint | ye, | |||
| guint32 | rgba | |||
| ) | [static] |
Definition at line 854 of file canvas-grid.cpp.
References org::w3c::dom::svg::a, b, SPCanvasBuf::buf, SPCanvasBuf::buf_rowstride, MAX, MIN, NR_COMPOSEN11_1111, NR_RGBA32_A, NR_RGBA32_B, NR_RGBA32_G, NR_RGBA32_R, uniconv-ext::p, polyhedron_3d::r, SPCanvasBuf::rect, NRRectL::x0, voronoi::y, NRRectL::y0, and NRRectL::y1.
Referenced by Inkscape::CanvasXYGrid::Render().
{
if ((x >= buf->rect.x0) && (x < buf->rect.x1)) {
guint r, g, b, a;
gint y0, y1, y;
guchar *p;
r = NR_RGBA32_R(rgba);
g = NR_RGBA32_G (rgba);
b = NR_RGBA32_B (rgba);
a = NR_RGBA32_A (rgba);
y0 = MAX (buf->rect.y0, ys);
y1 = MIN (buf->rect.y1, ye + 1);
p = buf->buf + (y0 - buf->rect.y0) * buf->buf_rowstride + (x - buf->rect.x0) * 4;
for (y = y0; y < y1; y++) {
p[0] = NR_COMPOSEN11_1111 (r, a, p[0]);
p[1] = NR_COMPOSEN11_1111 (g, a, p[1]);
p[2] = NR_COMPOSEN11_1111 (b, a, p[2]);
p += buf->buf_rowstride;
}
}
}
| bool Inkscape::have_viable_layer | ( | SPDesktop * | desktop, | |
| MessageContext * | message | |||
| ) |
Check to see if the current layer is both unhidden and unlocked.
If not, set a message about it on the given context.
- Parameters:
-
desktop Desktop. message Message context to put messages on.
- Returns:
- true if the current layer is both unhidden and unlocked, otherwise false.
Definition at line 30 of file context-fns.cpp.
References _, SPDesktop::currentLayer(), ERROR_MESSAGE, Inkscape::MessageContext::flash(), SPItem::isLocked(), SPDesktop::itemIsHidden(), and SP_ITEM.
Referenced by connector_handle_button_press(), Inkscape::UI::ClipboardManagerImpl::paste(), pen_handle_button_press(), pencil_handle_button_press(), sp_arc_drag(), sp_box3d_drag(), sp_dyna_draw_context_root_handler(), sp_eraser_context_root_handler(), sp_flood_context_root_handler(), sp_rect_drag(), sp_spiral_drag(), sp_spray_context_root_handler(), sp_star_drag(), sp_text_context_root_handler(), and sp_tweak_context_root_handler().
{
SPItem const *layer = SP_ITEM(desktop->currentLayer());
if ( !layer || desktop->itemIsHidden(layer) ) {
message->flash(Inkscape::ERROR_MESSAGE,
_("<b>Current layer is hidden</b>. Unhide it to be able to draw on it."));
return false;
}
if ( !layer || layer->isLocked() ) {
message->flash(Inkscape::ERROR_MESSAGE,
_("<b>Current layer is locked</b>. Unlock it to be able to draw on it."));
return false;
}
return true;
}
| bool Inkscape::have_viable_layer | ( | SPDesktop * | desktop, | |
| MessageStack * | message | |||
| ) |
Check to see if the current layer is both unhidden and unlocked.
If not, set a message about it on the given context.
- Parameters:
-
desktop Desktop. message Message context to put messages on.
- Returns:
- true if the current layer is both unhidden and unlocked, otherwise false.
Definition at line 59 of file context-fns.cpp.
References _, SPDesktop::currentLayer(), Inkscape::MessageStack::flash(), SPItem::isLocked(), SPDesktop::itemIsHidden(), SP_ITEM, and WARNING_MESSAGE.
{
SPItem const *layer = SP_ITEM(desktop->currentLayer());
if ( !layer || desktop->itemIsHidden(layer) ) {
message->flash(Inkscape::WARNING_MESSAGE,
_("<b>Current layer is hidden</b>. Unhide it to be able to draw on it."));
return false;
}
if ( !layer || layer->isLocked() ) {
message->flash(Inkscape::WARNING_MESSAGE,
_("<b>Current layer is locked</b>. Unlock it to be able to draw on it."));
return false;
}
return true;
}
| static Inkscape::XML::Document * Inkscape::loadImpl | ( | std::string const & | prefsFilename, | |
| Glib::ustring & | errMsg | |||
| ) | [static] |
Definition at line 206 of file preferences.cpp.
References _, Inkscape::Bind::msg(), Inkscape::XML::Node::name(), NULL, Inkscape::GC::release(), Inkscape::XML::Node::root(), and sp_repr_read_mem().
Referenced by Inkscape::Preferences::_load(), and Inkscape::Preferences::migrate().
{
// 2. Is it a regular file?
if (!g_file_test(prefsFilename.c_str(), G_FILE_TEST_IS_REGULAR)) {
gchar *msg = g_strdup_printf(_("The preferences file %s is not a regular file."),
Glib::filename_to_utf8(prefsFilename).c_str());
errMsg = msg;
g_free(msg);
return 0;
}
// 3. Is the file readable?
gchar *prefs_xml = NULL; gsize len = 0;
if (!g_file_get_contents(prefsFilename.c_str(), &prefs_xml, &len, NULL)) {
gchar *msg = g_strdup_printf(_("The preferences file %s could not be read."),
Glib::filename_to_utf8(prefsFilename).c_str());
errMsg = msg;
g_free(msg);
return 0;
}
// 4. Is it valid XML?
Inkscape::XML::Document *prefs_read = sp_repr_read_mem(prefs_xml, len, NULL);
g_free(prefs_xml);
if (!prefs_read) {
gchar *msg = g_strdup_printf(_("The preferences file %s is not a valid XML document."),
Glib::filename_to_utf8(prefsFilename).c_str());
errMsg = msg;
g_free(msg);
return 0;
}
// 5. Basic sanity check: does the root element have a correct name?
if (strcmp(prefs_read->root()->name(), "inkscape")) {
gchar *msg = g_strdup_printf(_("The file %s is not a valid Inkscape preferences file."),
Glib::filename_to_utf8(prefsFilename).c_str());
errMsg = msg;
g_free(msg);
Inkscape::GC::release(prefs_read);
return 0;
}
return prefs_read;
}
| static void Inkscape::migrateDetails | ( | Inkscape::XML::Document * | from, | |
| Inkscape::XML::Document * | to | |||
| ) | [static] |
Definition at line 251 of file preferences.cpp.
References Inkscape::XML::Node::mergeFrom(), and Inkscape::XML::Node::root().
Referenced by Inkscape::Preferences::_load().
Finds the next layer under root, relative to layer in depth-first order.
- Returns:
- NULL if there are no further layers under root
Referenced by Inkscape::UI::Dialog::LayersPanel::_checkTreeSelection(), Inkscape::LayerVerb::perform(), sp_selection_to_next_layer(), and SPDesktop::toggleLayerSolo().
| SVGOStringStream & Inkscape::operator<< | ( | SVGOStringStream & | ostr, | |
| const ConnectionPoint & | cp | |||
| ) |
| SVGIStringStream & Inkscape::operator>> | ( | SVGIStringStream & | istr, | |
| ConnectionPoint & | cp | |||
| ) |
Finds the previous layer under root, relative to layer in depth-first order.
- Returns:
- NULL if there are no prior layers under root.
Referenced by Inkscape::UI::Dialog::LayersPanel::_checkTreeSelection(), Inkscape::LayerVerb::perform(), sp_selection_to_prev_layer(), and SPDesktop::toggleLayerSolo().
| void Inkscape::queueIconPrerender | ( | Glib::ustring const & | oid, | |
| Inkscape::IconSize | size = Inkscape::ICON_SIZE_BUTTON | |||
| ) |
Definition at line 1183 of file icon.cpp.
References CLAMP, iconSizeLookup, injectCustomSize(), prerender_icon(), sizeMapDone, and sp_icon_get_phys_size().
Referenced by create_action_for_verb().
{
GtkStockItem stock;
gboolean stockFound = gtk_stock_lookup( name.c_str(), &stock );
if (!stockFound && !gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), name.c_str()) ) {
gint trySize = CLAMP( static_cast<gint>(lsize), 0, static_cast<gint>(G_N_ELEMENTS(iconSizeLookup) - 1) );
if ( !sizeMapDone ) {
injectCustomSize();
}
GtkIconSize mappedSize = iconSizeLookup[trySize];
int psize = sp_icon_get_phys_size(lsize);
// TODO place in a queue that is triggered by other map events
prerender_icon(name.c_str(), mappedSize, psize);
}
}
Returns x rounded to the nearest integer.
It is unspecified what happens if x is half way between two integers: we may in future use rint/round on platforms that have them. If you depend on a particular rounding behaviour, then please change this documentation accordingly.
Definition at line 14 of file round.h.
Referenced by Inkscape::UI::ScaleSideHandle::computeTransform(), Inkscape::UI::ScaleCornerHandle::computeTransform(), decimal_round(), Inkscape::Filters::interpolatePixels(), Inkscape::Rubberband::move(), Inkscape::LivePathEffect::RandomParam::param_set_value(), Inkscape::LivePathEffect::ScalarParam::param_set_value(), Inkscape::Filters::FilterMorphology::render(), Inkscape::Filters::FilterComposite::render(), Inkscape::CanvasXYGrid::Render(), Inkscape::CanvasAxonomGrid::Render(), Inkscape::SelTrans::scaleRequest(), Inkscape::Extension::Internal::sp_asbitmap_render(), sp_guideline_render(), sp_guideline_update(), sp_hruler_draw_pos(), sp_hruler_draw_ticks(), sp_vruler_draw_pos(), sp_vruler_draw_ticks(), and Inkscape::SelTrans::stretchRequest().
{
return std::floor( x + .5 );
}
| Geom::Point Inkscape::setup_for_drag_start | ( | SPDesktop * | desktop, | |
| SPEventContext * | ec, | |||
| GdkEvent * | ev | |||
| ) |
Definition at line 218 of file context-fns.cpp.
References SPEventContext::desktop, SPEventContext::item_to_select, uniconv-ext::p, sp_event_context_find_item(), TRUE, SPDesktop::w2d(), SPEventContext::within_tolerance, SPEventContext::xp, and SPEventContext::yp.
Referenced by sp_arc_context_item_handler(), sp_arc_context_root_handler(), sp_box3d_context_item_handler(), sp_rect_context_item_handler(), sp_spiral_context_root_handler(), and sp_star_context_root_handler().
{
ec->xp = static_cast<gint>(ev->button.x);
ec->yp = static_cast<gint>(ev->button.y);
ec->within_tolerance = true;
Geom::Point const p(ev->button.x, ev->button.y);
ec->item_to_select = sp_event_context_find_item(desktop, p, ev->button.state & GDK_MOD1_MASK, TRUE);
return ec->desktop->w2d(p);
}
| Geom::Rect Inkscape::snap_rectangular_box | ( | SPDesktop const * | desktop, | |
| SPItem * | item, | |||
| Geom::Point const & | pt, | |||
| Geom::Point const & | center, | |||
| int | state | |||
| ) |
Definition at line 79 of file context-fns.cpp.
References SnapManager::constrainedSnap(), CxxTest::delta(), SPDesktop::dt2doc(), SnapManager::freeSnap(), Inkscape::SnappedPoint::getPoint(), Inkscape::SnappedPoint::getSnapped(), goldenratio, MAX, midpt_1_goldenratio, midpt_goldenratio_2, MIN, SPDesktop::namedview, uniconv-ext::p, Inkscape::Display::SnapIndicator::set_new_snaptarget(), SnapManager::setup(), Geom::shift(), sign, SPNamedView::snap_manager, SPDesktop::snapindicator, SNAPSOURCE_NODE_HANDLE, Geom::X, and Geom::Y.
Referenced by sp_arc_drag(), and sp_rect_drag().
{
Geom::Point p[2];
bool const shift = state & GDK_SHIFT_MASK;
bool const control = state & GDK_CONTROL_MASK;
SnapManager &m = desktop->namedview->snap_manager;
m.setup(desktop, false, item);
Inkscape::SnappedPoint snappoint;
if (control) {
/* Control is down: we are constrained to producing integer-ratio rectangles */
/* Vector from the centre of the box to the point we are dragging to */
Geom::Point delta = pt - center;
/* Round it so that we have an integer-ratio (or golden ratio) box */
if (fabs(delta[Geom::X]) > fabs(delta[Geom::Y]) && (delta[Geom::Y] != 0.0)) {
double ratio = delta[Geom::X] / delta[Geom::Y];
double ratioabs = fabs (ratio);
double sign = (ratio < 0 ? -1 : 1);
if (midpt_1_goldenratio < ratioabs && ratioabs < midpt_goldenratio_2) {
delta[Geom::X] = sign * goldenratio * delta[Geom::Y];
} else {
delta[Geom::X] = floor(ratio + 0.5) * delta[Geom::Y];
}
} else if (delta[Geom::X] != 0.0) {
double ratio = delta[Geom::Y] / delta[Geom::X];
double ratioabs = fabs (ratio);
double sign = (ratio < 0 ? -1 : 1);
if (midpt_1_goldenratio < ratioabs && ratioabs < midpt_goldenratio_2) {
delta[Geom::Y] = sign * goldenratio * delta[Geom::X];
} else {
delta[Geom::Y] = floor(delta[Geom::Y] / delta[Geom::X] + 0.5) * delta[Geom::X];
}
}
/* p[1] is the dragged point with the integer-ratio constraint */
p[1] = center + delta;
if (shift) {
/* Shift is down, so our origin is the centre point rather than the corner
** point; this means that corner-point movements are bound to each other.
*/
/* p[0] is the opposite corner of our box */
p[0] = center - delta;
Inkscape::SnappedPoint s[2];
/* Try to snap p[0] (the opposite corner) along the constraint vector */
s[0] = m.constrainedSnap(Inkscape::SnapCandidatePoint(p[0], Inkscape::SNAPSOURCE_NODE_HANDLE),
Inkscape::Snapper::SnapConstraint(p[0] - p[1]));
/* Try to snap p[1] (the dragged corner) along the constraint vector */
s[1] = m.constrainedSnap(Inkscape::SnapCandidatePoint(p[1], Inkscape::SNAPSOURCE_NODE_HANDLE),
Inkscape::Snapper::SnapConstraint(p[1] - p[0]));
/* Choose the best snap and update points accordingly */
if (s[0].getSnapDistance() < s[1].getSnapDistance()) {
if (s[0].getSnapped()) {
p[0] = s[0].getPoint();
p[1] = 2 * center - s[0].getPoint();
snappoint = s[0];
}
} else {
if (s[1].getSnapped()) {
p[0] = 2 * center - s[1].getPoint();
p[1] = s[1].getPoint();
snappoint = s[1];
}
}
} else {
/* Our origin is the opposite corner. Snap the drag point along the constraint vector */
p[0] = center;
snappoint = m.constrainedSnap(Inkscape::SnapCandidatePoint(p[1], Inkscape::SNAPSOURCE_NODE_HANDLE),
Inkscape::Snapper::SnapConstraint(p[1] - p[0]));
if (snappoint.getSnapped()) {
p[1] = snappoint.getPoint();
}
}
} else if (shift) {
/* Shift is down, so our origin is the centre point rather than the corner point;
** this means that corner-point movements are bound to each other.
*/
p[1] = pt;
p[0] = 2 * center - p[1];
Inkscape::SnappedPoint s[2];
s[0] = m.freeSnap(Inkscape::SnapCandidatePoint(p[0], Inkscape::SNAPSOURCE_NODE_HANDLE));
s[1] = m.freeSnap(Inkscape::SnapCandidatePoint(p[1], Inkscape::SNAPSOURCE_NODE_HANDLE));
if (s[0].getSnapDistance() < s[1].getSnapDistance()) {
if (s[0].getSnapped()) {
p[0] = s[0].getPoint();
p[1] = 2 * center - s[0].getPoint();
snappoint = s[0];
}
} else {
if (s[1].getSnapped()) {
p[0] = 2 * center - s[1].getPoint();
p[1] = s[1].getPoint();
snappoint = s[1];
}
}
} else {
/* There's no constraint on the corner point, so just snap it to anything */
p[0] = center;
p[1] = pt;
snappoint = m.freeSnap(Inkscape::SnapCandidatePoint(pt, Inkscape::SNAPSOURCE_NODE_HANDLE));
if (snappoint.getSnapped()) {
p[1] = snappoint.getPoint();
}
}
if (snappoint.getSnapped()) {
desktop->snapindicator->set_new_snaptarget(snappoint);
}
p[0] *= desktop->dt2doc();
p[1] *= desktop->dt2doc();
return Geom::Rect(Geom::Point(MIN(p[0][Geom::X], p[1][Geom::X]), MIN(p[0][Geom::Y], p[1][Geom::Y])),
Geom::Point(MAX(p[0][Geom::X], p[1][Geom::X]), MAX(p[0][Geom::Y], p[1][Geom::Y])));
}
| static gboolean Inkscape::sp_nv_read_length | ( | gchar const * | str, | |
| guint | base, | |||
| gdouble * | val, | |||
| SPUnit const ** | unit | |||
| ) | [static] |
Definition at line 453 of file canvas-grid.cpp.
References SP_UNIT_ABSOLUTE, SP_UNIT_CM, SP_UNIT_DEVICE, sp_unit_get_by_id(), SP_UNIT_IN, SP_UNIT_M, SP_UNIT_MM, SP_UNIT_PT, and SP_UNIT_PX.
Referenced by Inkscape::CanvasXYGrid::readRepr(), and Inkscape::CanvasAxonomGrid::readRepr().
{
if (!str) {
return FALSE;
}
gchar *u;
gdouble v = g_ascii_strtod(str, &u);
if (!u) {
return FALSE;
}
while (isspace(*u)) {
u += 1;
}
if (!*u) {
/* No unit specified - keep default */
*val = v;
return TRUE;
}
if (base & SP_UNIT_DEVICE) {
if (u[0] && u[1] && !isalnum(u[2]) && !strncmp(u, "px", 2)) {
*unit = &sp_unit_get_by_id(SP_UNIT_PX);
*val = v;
return TRUE;
}
}
if (base & SP_UNIT_ABSOLUTE) {
if (!strncmp(u, "pt", 2)) {
*unit = &sp_unit_get_by_id(SP_UNIT_PT);
} else if (!strncmp(u, "mm", 2)) {
*unit = &sp_unit_get_by_id(SP_UNIT_MM);
} else if (!strncmp(u, "cm", 2)) {
*unit = &sp_unit_get_by_id(SP_UNIT_CM);
} else if (!strncmp(u, "m", 1)) {
*unit = &sp_unit_get_by_id(SP_UNIT_M);
} else if (!strncmp(u, "in", 2)) {
*unit = &sp_unit_get_by_id(SP_UNIT_IN);
} else {
return FALSE;
}
*val = v;
return TRUE;
}
return FALSE;
}
| static gboolean Inkscape::sp_nv_read_opacity | ( | gchar const * | str, | |
| guint32 * | color | |||
| ) | [static] |
Definition at line 503 of file canvas-grid.cpp.
References CLAMP.
Referenced by Inkscape::CanvasXYGrid::readRepr(), and Inkscape::CanvasAxonomGrid::readRepr().
| static void Inkscape::validateInt | ( | gint | oldVal, | |
| gint * | pTarget | |||
| ) | [static] |
If the passed int is invalid (<=0), then set the widget and the int to use the given old value.
- Parameters:
-
oldVal Old value to use if the new one is invalid. pTarget The int to validate. widget Widget associated with the int.
Definition at line 555 of file canvas-grid.cpp.
References NULL.
Referenced by Inkscape::CanvasXYGrid::readRepr().
{
// Avoid nullness.
if ( pTarget == NULL )
return;
// Invalid new value?
if ( *pTarget <= 0 ) {
// If the old value is somehow invalid as well, then default to 1.
if ( oldVal <= 0 )
oldVal = 1;
// Reset the int and associated widget to the old value.
*pTarget = oldVal;
} //if
} //validateInt
If the passed scalar is invalid (<=0), then set the widget and the scalar to use the given old value.
- Parameters:
-
oldVal Old value to use if the new one is invalid. pTarget The scalar to validate. widget Widget associated with the scalar.
Definition at line 528 of file canvas-grid.cpp.
References NULL.
Referenced by Inkscape::CanvasXYGrid::readRepr().
{
// Avoid nullness.
if ( pTarget == NULL )
return;
// Invalid new value?
if ( *pTarget <= 0 ) {
// If the old value is somehow invalid as well, then default to 1.
if ( oldVal <= 0 )
oldVal = 1;
// Reset the scalar and associated widget to the old value.
*pTarget = oldVal;
} //if
} //validateScalar
Variable Documentation
Inkscape::XML::NodeEventVector const Inkscape::_repr_events [static] |
{
NULL,
NULL,
CanvasGrid::on_repr_attr_changed,
NULL,
NULL
}
Definition at line 150 of file canvas-grid.cpp.
Referenced by Inkscape::CanvasGrid::CanvasGrid().
gchar const* const Inkscape::grid_name[] [static] |
{
N_("Rectangular grid"),
}
Definition at line 38 of file canvas-grid.cpp.
Referenced by Inkscape::CanvasGrid::getGridTypeFromName(), and Inkscape::CanvasGrid::getName().
gchar const* const Inkscape::grid_svgname[] [static] |
{
"xygrid",
"axonomgrid"
}
Definition at line 42 of file canvas-grid.cpp.
Referenced by Inkscape::CanvasGrid::getGridTypeFromSVGName(), and Inkscape::CanvasGrid::getSVGName().
Inkscape::XML::Document* Inkscape::migrateFromDoc = 0 [static] |
Definition at line 34 of file preferences.cpp.
Referenced by Inkscape::Preferences::_load(), and Inkscape::Preferences::migrate().
SPCanvasItemClass* Inkscape::parent_class [static] |
Definition at line 57 of file canvas-grid.cpp.
Referenced by grid_canvasitem_class_init(), grid_canvasitem_destroy(), and grid_canvasitem_update().
const int Inkscape::RUNAWAY_MAX = 1000 [static] |
Definition at line 48 of file device-manager.cpp.
Referenced by Inkscape::InputDeviceImpl::createId().
DeviceManagerImpl* Inkscape::theInstance = 0 [static] |
Definition at line 556 of file device-manager.cpp.
Referenced by Inkscape::DeviceManager::getManager().
gchar const* Inkscape::undo_F_label = undo_F_label_1 [static] |
Definition at line 346 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::dragFromPaint(), and Inkscape::FillNStroke::updateFromPaint().
gchar const* Inkscape::undo_F_label_1 = "fill:flatcolor:1" [static] |
Definition at line 340 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::updateFromPaint().
gchar const* Inkscape::undo_F_label_2 = "fill:flatcolor:2" [static] |
Definition at line 341 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::updateFromPaint().
gchar const* Inkscape::undo_S_label = undo_S_label_1 [static] |
Definition at line 347 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::dragFromPaint(), and Inkscape::FillNStroke::updateFromPaint().
gchar const* Inkscape::undo_S_label_1 = "stroke:flatcolor:1" [static] |
Definition at line 343 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::updateFromPaint().
gchar const* Inkscape::undo_S_label_2 = "stroke:flatcolor:2" [static] |
Definition at line 344 of file fill-style.cpp.
Referenced by Inkscape::FillNStroke::updateFromPaint().
pair<gint, gint> Inkscape::vals[] [static] |
{
pair<gint, gint>(0, 1), pair<gint, gint>(1, 1 << 1), pair<gint, gint>(2, 1 << 2), pair<gint, gint>(3, 1 << 3),
pair<gint, gint>(4, 1 << 4), pair<gint, gint>(5, 1 << 5), pair<gint, gint>(6, 1 << 6), pair<gint, gint>(7, 1 << 7),
pair<gint, gint>(8, 1 << 8), pair<gint, gint>(9, 1 << 9), pair<gint, gint>(10, 1 << 10), pair<gint, gint>(11, 1 << 11),
pair<gint, gint>(12, 1 << 12), pair<gint, gint>(13, 1 << 13), pair<gint, gint>(14, 1 << 14), pair<gint, gint>(15, 1 << 15),
pair<gint, gint>(16, 1 << 16), pair<gint, gint>(17, 1 << 17), pair<gint, gint>(18, 1 << 18), pair<gint, gint>(19, 1 << 19),
pair<gint, gint>(20, 1 << 20), pair<gint, gint>(21, 1 << 21), pair<gint, gint>(22, 1 << 22), pair<gint, gint>(23, 1 << 23)
}
Definition at line 37 of file device-manager.cpp.
| gchar const* Inkscape::version_string |
Full version string.
Referenced by Inkscape::UI::Dialog::AboutBox::AboutBox(), Inkscape::UI::Dialog::build_splash_widget(), Inkscape::Extension::Internal::PovOutput::doHeader(), Inkscape::Extension::Internal::JavaFXOutput::doHeader(), potrace_version(), sp_document_create(), sp_main_shell(), sp_process_args(), and sp_root_write().
