MCPcopy Create free account
hub / github.com/andrewreeman/SpectralSuite / clipY

Method clipY

shared/components/ControlPointComponent.cpp:225–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225int ControlPointComponent::clipY(int newY, int) {
226 auto padding = 0;
227 auto bounds = getBounds();
228 auto bottom = bounds.getBottom() - padding;
229 auto top = bounds.getY() + padding;
230
231 if(newY > bottom) {
232 return bottom;
233 }
234
235 if(newY < top) {
236 return top;
237 }
238
239 return newY;
240}
241
242void ControlPointComponent::populateOutputValues() {
243 float bottom = (float)getLocalBounds().getBottom();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected