public virtual void DoLayout() { _preBeatGlyphs = new LeftToRightLayoutingGlyphGroup(); _preBeatGlyphs.Renderer = this; _voiceContainers = new FastDictionary <int, VoiceContainerGlyph>(); _postBeatGlyphs = new LeftToRightLayoutingGlyphGroup(); _postBeatGlyphs.Renderer = this; for (int i = 0; i < Bar.Voices.Count; i++) { var voice = Bar.Voices[i]; if (HasVoiceContainer(voice)) { var c = new VoiceContainerGlyph(0, 0, voice); c.Renderer = this; _voiceContainers[Bar.Voices[i].Index] = c; } } if (Bar.SimileMark == SimileMark.SecondOfDouble) { CanWrap = false; } CreatePreBeatGlyphs(); CreateBeatGlyphs(); CreatePostBeatGlyphs(); UpdateSizes(); }
public BarRendererBase(Bar bar) { Bar = bar; IsEmpty = true; _preBeatGlyphs = new LeftToRightLayoutingGlyphGroup(); _preBeatGlyphs.Renderer = this; _voiceContainers = new FastDictionary <int, VoiceContainerGlyph>(); _postBeatGlyphs = new LeftToRightLayoutingGlyphGroup(); _postBeatGlyphs.Renderer = this; }
public void ReLayout() { // there are some glyphs which are shown only for renderers at the line start, so we simply recreate them // but we only need to recreate them for the renderers that were the first of the line or are now the first of the line if ((_wasFirstOfLine && !IsFirstOfLine) || (!_wasFirstOfLine && IsFirstOfLine)) { _preBeatGlyphs = new LeftToRightLayoutingGlyphGroup(); _preBeatGlyphs.Renderer = this; CreatePreBeatGlyphs(); } UpdateSizes(); RegisterLayoutingInfo(); }