Re: [question] SoundFileView - channel spacing
[email protected] Thu, 12 Apr 2018 08:07:58 +0800
| Newsgroups | gmane.comp.audio.supercollider.devel |
|---|---|
| Message-ID | <[email protected]> |
On April 12, 2018 04:49:03 scott-y6qSm6YX8/[email protected] wrote: > Calculating the channel rects is simple: > channelHeight = (bounds.height / channels) - spacing; > channelTop = channel * (channelHeight + spacing); As I recall from doing pixel counts in the days before Layouts, there will be a top and bottom margin (2), plus n-1 gaps between the n channels, so: (bounds.height - (spacing * (channels + 1))) / channels (So glad not to have to think about that anymore :D ) hjh Sent with AquaMail for Android http://www.aqua-mail.com