diff options
| author | Raphael Rosch <launchpad@insaner.com> | 2014-03-12 18:34:51 +0000 |
|---|---|---|
| committer | insaner <launchpad@insaner.com> | 2014-03-12 18:34:51 +0000 |
| commit | 76be008fcda64acffe569af78f77a07b0d4ea593 (patch) | |
| tree | 9b0d89072acc9c36b3c5ed41dd797e4df4c63bfb /src/sp-gradient.cpp | |
| parent | Use NEAREST filter when transforming cache (diff) | |
| download | inkscape-76be008fcda64acffe569af78f77a07b0d4ea593.tar.gz inkscape-76be008fcda64acffe569af78f77a07b0d4ea593.zip | |
incorrect gradient transform on copy&paste.. committing for mathog
Fixed bugs:
- https://launchpad.net/bugs/1283193
(bzr r13139)
Diffstat (limited to '')
| -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 |
