public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer) : base(0, 0) { Beat = beat; Ties = new FastList <Glyph>(); VoiceContainer = voiceContainer; }
public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false) : base(0, 0) { Beat = beat; Ties = new FastList <Glyph>(); VoiceContainer = voiceContainer; UseLayoutingInfo = useLayoutingInfo; }
public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false) : base(0, 0) { Beat = beat; Ties = new FastList<Glyph>(); VoiceContainer = voiceContainer; UseLayoutingInfo = useLayoutingInfo; }
private void UpdateWidth() { Width = PostBeatGlyphsStart; if (_postBeatGlyphs.Count > 0) { Width += _postBeatGlyphs[_postBeatGlyphs.Count - 1].X + _postBeatGlyphs[_postBeatGlyphs.Count - 1].Width; } Std.Foreach(_voiceContainers.Values, c => { if (_biggestVoiceContainer == null || c.Width > _biggestVoiceContainer.Width) { _biggestVoiceContainer = c; } }); }
private VoiceContainerGlyph GetOrCreateVoiceContainer(int voiceIndex) { VoiceContainerGlyph c; if (voiceIndex >= _voiceContainers.Count) { c = new VoiceContainerGlyph(0, 0, voiceIndex); c.Renderer = this; _voiceContainers[voiceIndex] = c; } else { c = _voiceContainers[voiceIndex]; } return c; }
public ScoreBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer) : base(beat, voiceContainer) { }
public virtual void DoLayout() { Helpers = Staff.StaveGroup.Helpers.Helpers[Bar.Staff.Track.Index][Bar.Staff.Index][Bar.Index]; for (int i = 0; i < Bar.Voices.Count; i++) { var voice = Bar.Voices[i]; var c = new VoiceContainerGlyph(0, 0, voice); c.Renderer = this; _voiceContainers[Bar.Voices[i].Index] = c; } CreatePreBeatGlyphs(); CreateBeatGlyphs(); CreatePostBeatGlyphs(); var postBeatStart = 0f; foreach (var voice in _voiceContainers) { var c = _voiceContainers[voice]; c.X = BeatGlyphsStart; c.DoLayout(); var x = c.X + c.Width; if (postBeatStart < x) { postBeatStart = x; } } _postBeatGlyphs.X = postBeatStart; Width = _postBeatGlyphs.X + _postBeatGlyphs.Width; }
public TabBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer) : base(beat, voiceContainer) { }