diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-03-12 20:15:38 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-03-12 20:15:38 +0000 |
| commit | 3697b9ed4fa85fc4deb9a9069dc7397fbedc2003 (patch) | |
| tree | b1e8aa49ce94542b41231eb36c6e804ec2b3e08c /src/sp-gradient.cpp | |
| parent | update to trunk (diff) | |
| parent | incorrect gradient transform on copy&paste.. committing for mathog (diff) | |
| download | inkscape-3697b9ed4fa85fc4deb9a9069dc7397fbedc2003.tar.gz inkscape-3697b9ed4fa85fc4deb9a9069dc7397fbedc2003.zip | |
update to trunk
(bzr r11950.1.291)
Diffstat (limited to 'src/sp-gradient.cpp')
| -rw-r--r-- | src/sp-gradient.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/sp-gradient.cpp b/src/sp-gradient.cpp index 04fb18cf3..e2ae98ec5 100644 --- a/src/sp-gradient.cpp +++ b/src/sp-gradient.cpp @@ -135,6 +135,25 @@ gboolean SPGradient::isEquivalent(SPGradient *that) return TRUE; } +/** + * return true if this gradient is "aligned" to that gradient. + * Aligned means that they have exactly the same transform. + * @param that - A gradient to compare this to + */ +gboolean SPGradient::isAligned(SPGradient *that) +{ + bool status = FALSE; + + while(1){ // not really a loop, used to avoid deep nesting or multiple exit points from function + if(this->gradientTransform_set != that->gradientTransform_set) { break; } + if(this->gradientTransform_set && + (this->gradientTransform != that->gradientTransform)) { break; } + status = TRUE; + break; + } + return status; +} + /* * Gradient |
