public void UpdateSettings(Settings settings) { if (CheckAccess()) { _renderer.UpdateSettings(settings); } else { _workerQueue.Add(() => UpdateSettings(settings)); } }
public void InvalidateTracks(bool force) { var trackArray = Tracks?.ToArray(); if (trackArray == null || trackArray.Length == 0) { return; } var width = RenderWidth; if (width > 0) { if (trackArray == Renderer.Tracks && !force) { return; } var settings = Renderer.Settings; settings.Width = width; settings.Engine = RenderEngine; settings.Height = ScoreHeight; settings.Scale = Scale; settings.Layout.Mode = LayoutMode; settings.StretchForce = StretchForce; settings.Staves.Id = StavesMode; Renderer.UpdateSettings(settings); ModelUtils.ApplyPitchOffsets(settings, trackArray[0].Score); _initialRenderCompleted = false; _isRendering = 1; Task.Factory.StartNew(() => { Renderer.RenderMultiple(trackArray); }); } else { _initialRenderCompleted = false; _redrawPending = true; _isRendering = 0; } }
private void UpdateSettings(object settings) { _renderer.UpdateSettings(Settings.FromJson(settings, null)); }