MCPcopy Create free account
hub / github.com/DISTRHO/DPF / recreateLines

Function recreateLines

tests/widgets/ResizeHandle.hpp:182–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 void recreateLines(const uint x, const uint y, const uint size)
183 {
184 uint linesize = size;
185 uint offset = 0;
186
187 // 1st line, full diagonal size
188 l1.setStartPos(x + size, y);
189 l1.setEndPos(x, y + size);
190
191 // 2nd line, bit more to the right and down, cropped
192 offset += size / 3;
193 linesize -= size / 3;
194 l2.setStartPos(x + linesize + offset, y + offset);
195 l2.setEndPos(x + offset, y + linesize + offset);
196
197 // 3rd line, even more right and down
198 offset += size / 3;
199 linesize -= size / 3;
200 l3.setStartPos(x + linesize + offset, y + offset);
201 l3.setEndPos(x + offset, y + linesize + offset);
202 }
203
204 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ResizeHandle)
205};

Callers 1

resetAreaFunction · 0.70

Calls 2

setStartPosMethod · 0.45
setEndPosMethod · 0.45

Tested by

no test coverage detected