diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-02 15:29:06 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-02 15:29:06 +0000 |
| commit | 1d854ff519b9c0867bfa4ecaf2f6329ca256f06a (patch) | |
| tree | 437352a17301fbdd1787213b7dec3788b6e8eefa /src/sp-item.cpp | |
| parent | rename variable names to prevent hiding of names in outer scopes (diff) | |
| download | inkscape-1d854ff519b9c0867bfa4ecaf2f6329ca256f06a.tar.gz inkscape-1d854ff519b9c0867bfa4ecaf2f6329ca256f06a.zip | |
Experimental merge of Ponyscape features into trunk (will not compile)
(bzr r13090.1.1)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 5e126f486..aec749929 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -183,6 +183,26 @@ bool SPItem::isHidden(unsigned display_key) const { return true; } +bool SPItem::isHighlightSet() const { + return _highlightColor != NULL; +} + +guint32 SPItem::highlight_color() const { + if (_highlightColor) + { + return atoi(_highlightColor) | 0x000000ff; + } + else if (parent && parent != this && SP_IS_ITEM(parent)) + { + return SP_ITEM(parent)->highlight_color(); + } + else + { + static Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + return prefs->getInt("/tools/nodes/highlight_color", 0xff0000ff) | 0x000000ff; + } +} + void SPItem::setEvaluated(bool evaluated) { _is_evaluated = evaluated; _evaluated_status = StatusSet; |
