Changeset View
Changeset View
Standalone View
Standalone View
layers/selections/image/kpImageSelectionTransparency.cpp
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | |||||
96 | 96 | | |||
97 | bool kpImageSelectionTransparency::operator!= (const kpImageSelectionTransparency &rhs) const | 97 | bool kpImageSelectionTransparency::operator!= (const kpImageSelectionTransparency &rhs) const | ||
98 | { | 98 | { | ||
99 | return !(*this == rhs); | 99 | return !(*this == rhs); | ||
100 | } | 100 | } | ||
101 | 101 | | |||
102 | //--------------------------------------------------------------------- | 102 | //--------------------------------------------------------------------- | ||
103 | 103 | | |||
104 | kpImageSelectionTransparency::~kpImageSelectionTransparency () | 104 | kpImageSelectionTransparency::~kpImageSelectionTransparency () = default; | ||
105 | { | | |||
106 | } | | |||
107 | 105 | | |||
108 | //--------------------------------------------------------------------- | 106 | //--------------------------------------------------------------------- | ||
109 | 107 | | |||
110 | // public | 108 | // public | ||
111 | bool kpImageSelectionTransparency::isOpaque () const | 109 | bool kpImageSelectionTransparency::isOpaque () const | ||
112 | { | 110 | { | ||
113 | return m_isOpaque; | 111 | return m_isOpaque; | ||
114 | } | 112 | } | ||
Show All 27 Lines | |||||
142 | 140 | | |||
143 | // public | 141 | // public | ||
144 | kpColor kpImageSelectionTransparency::transparentColor () const | 142 | kpColor kpImageSelectionTransparency::transparentColor () const | ||
145 | { | 143 | { | ||
146 | if (m_isOpaque) | 144 | if (m_isOpaque) | ||
147 | { | 145 | { | ||
148 | // There are legitimate uses for this so no qCCritical(kpLogLayers) | 146 | // There are legitimate uses for this so no qCCritical(kpLogLayers) | ||
149 | qCDebug(kpLogLayers) << "kpImageSelectionTransparency::transparentColor() " | 147 | qCDebug(kpLogLayers) << "kpImageSelectionTransparency::transparentColor() " | ||
150 | "getting transparent color even though opaque" << endl; | 148 | "getting transparent color even though opaque"; | ||
151 | } | 149 | } | ||
152 | 150 | | |||
153 | return m_transparentColor; | 151 | return m_transparentColor; | ||
154 | } | 152 | } | ||
155 | 153 | | |||
156 | //--------------------------------------------------------------------- | 154 | //--------------------------------------------------------------------- | ||
157 | 155 | | |||
158 | // public | 156 | // public | ||
159 | void kpImageSelectionTransparency::setTransparentColor (const kpColor &transparentColor) | 157 | void kpImageSelectionTransparency::setTransparentColor (const kpColor &transparentColor) | ||
160 | { | 158 | { | ||
161 | m_transparentColor = transparentColor; | 159 | m_transparentColor = transparentColor; | ||
162 | } | 160 | } | ||
163 | 161 | | |||
164 | //--------------------------------------------------------------------- | 162 | //--------------------------------------------------------------------- | ||
165 | 163 | | |||
166 | 164 | | |||
167 | // public | 165 | // public | ||
168 | double kpImageSelectionTransparency::colorSimilarity () const | 166 | double kpImageSelectionTransparency::colorSimilarity () const | ||
169 | { | 167 | { | ||
170 | if (m_colorSimilarity < 0 || | 168 | if (m_colorSimilarity < 0 || | ||
171 | m_colorSimilarity > kpColorSimilarityHolder::MaxColorSimilarity) | 169 | m_colorSimilarity > kpColorSimilarityHolder::MaxColorSimilarity) | ||
172 | { | 170 | { | ||
173 | qCCritical(kpLogLayers) << "kpImageSelectionTransparency::colorSimilarity() invalid colorSimilarity" << endl; | 171 | qCCritical(kpLogLayers) << "kpImageSelectionTransparency::colorSimilarity() invalid colorSimilarity"; | ||
174 | return 0; | 172 | return 0; | ||
175 | } | 173 | } | ||
176 | 174 | | |||
177 | return m_colorSimilarity; | 175 | return m_colorSimilarity; | ||
178 | } | 176 | } | ||
179 | 177 | | |||
180 | //--------------------------------------------------------------------- | 178 | //--------------------------------------------------------------------- | ||
181 | 179 | | |||
Show All 16 Lines |