stroke-style.cpp revision bd3d5a41afe4498f769d5a8425bf8eb36daa3add
2N/A#define noSP_SS_VERBOSE
2N/A#include "desktop-handles.h"
2N/A#include "desktop-style.h"
2N/A#include "dialogs/dialog-events.h"
2N/A#include "document-private.h"
2N/A#include "gradient-chemistry.h"
2N/A#include "helper/stock-items.h"
2N/A#include "helper/unit-menu.h"
2N/A#include "inkscape.h"
2N/A#include "path-prefix.h"
2N/A#include "selection.h"
2N/A#include "sp-linear-gradient.h"
2N/A#include "sp-namedview.h"
2N/A#include "sp-pattern.h"
2N/A#include "sp-radial-gradient.h"
2N/A#include "svg/css-ostringstream.h"
2N/A#include "ui/cache/svg_preview_cache.h"
2N/A#include "ui/icon-names.h"
2N/A#include "widgets/dash-selector.h"
2N/A#include "widgets/paint-selector.h"
2N/A#include "widgets/sp-widget.h"
2N/A#include "widgets/spw-utilities.h"
2N/A#include "ui/widget/spinbutton.h"
2N/A#include "stroke-style.h"
2N/A#include "fill-n-stroke-factory.h"
2N/Astatic void sp_stroke_style_line_selection_modified(SPWidget *spw, Inkscape::Selection *selection, guint flags, gpointer data);
2N/Astatic void sp_stroke_style_line_selection_changed(SPWidget *spw, Inkscape::Selection *selection, gpointer data);
if (!dbox) {
return NULL;
if (!pixbuf) {
return pb;
GSList *
return NULL;
return ml;
#define MARKER_ITEM_MARGIN 0
sp_marker_menu_build (Gtk::Menu *m, GSList *marker_list, SPDocument *source, SPDocument *sandbox, gchar const *menu_id)
i->show();
l->show();
m->append(*i);
static void sp_marker_list_from_doc(Gtk::Menu *m, SPDocument * /*current_doc*/, SPDocument *source, SPDocument * /*markers_doc*/, SPDocument *sandbox, gchar const *menu_id)
gchar const *buffer = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">"
" <path style=\"fill:none;stroke:black;stroke-width:1.7;marker-start:url(#sample);marker-mid:none;marker-end:none\""
" <path style=\"fill:none;stroke:black;stroke-width:1.7;marker-start:none;marker-mid:url(#sample);marker-end:none\""
" <path style=\"fill:none;stroke:black;stroke-width:1.7;marker-start:none;marker-mid:none;marker-end:url(#sample)\""
ink_marker_menu_create_menu(Gtk::Menu *m, gchar const *menu_id, SPDocument *doc, SPDocument *sandbox)
i->show();
l->show();
m->append(*i);
// find and load markers.svg
i->show();
m->append(*i);
// suck in from markers.svg
if (markers_doc) {
* Creates a menu widget to display markers from markers.svg
m->show();
if (!doc) {
i->show();
m->append(*i);
return mnu;
if (!document) {
if (mark) {
if (!SP_IS_SHAPE(item) || SP_IS_RECT(item)) { // can't set marker to rect, until it's converted to using <path>
if (selrepr) {
css = 0;
int pos;
switch (which) {
case SP_MARKER_LOC_START:
m->show();
case SP_MARKER_LOC_MID:
m->show();
case SP_MARKER_LOC_END:
m->show();
if (!desktop) {
return FALSE;
return FALSE;
return FALSE;
return TRUE;
return TRUE;
return FALSE;
f->show();
t->show();
f->add(*t);
gint i = 0;
if (desktop)
a->signal_value_changed().connect(sigc::bind(sigc::ptr_fun(&sp_stroke_style_miterlimit_changed), spw));
t->attach(*marker_start_menu, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
tt->set_tip(*marker_mid_menu, _("Mid Markers are drawn on every node of a path or shape except the first and last nodes"));
t->attach(*marker_mid_menu, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
t->attach(*marker_end_menu, 1, 4, i, i+1, (Gtk::EXPAND | Gtk::FILL), static_cast<Gtk::AttachOptions>(0), 0, 0);
spw);
spw);
return spw;
for (int i = 0; i < len; i++) {
switch (jointype) {
case SP_STROKE_LINEJOIN_MITER:
case SP_STROKE_LINEJOIN_ROUND:
case SP_STROKE_LINEJOIN_BEVEL:
switch (captype) {
case SP_STROKE_LINECAP_BUTT:
case SP_STROKE_LINECAP_ROUND:
case SP_STROKE_LINECAP_SQUARE:
int result_sw = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEWIDTH);
int result_ml = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEMITERLIMIT);
int result_join = sp_desktop_query_style (SP_ACTIVE_DESKTOP, query, QUERY_STYLE_PROPERTY_STROKEJOIN);
double scale)
if (ndash > 0) {
for (int i = 0; i < ndash; i++) {
if (items) {
int ndash;
double width;
css = 0;
if (join) {
if (join) {
} else if (cap) {
css = 0;
bool mark_is_stock = false;
mark_is_stock = true;
if (mark_is_stock) {
bool all_texts = true;
all_texts = false;
SPObject *marker = ink_extract_marker_name(object->style->marker[keyloc[i].loc].value, object->document);
static SPObject*
gchar const *p = n;
return NULL;
return NULL;
return marker;