public static ViewerConfig LoadFromModels(ModelsEx models, Components c) { var res = new ViewerConfig(); if (c.HasFlag(Components.Images)) { res.Images = ImagesConfig.LoadFromModels(models); } if (c.HasFlag(Components.Equations)) { res.Equation = EquationConfig.LoadFromModels(models); } if (c.HasFlag(Components.Filter)) { res.Filter = FilterConfig.LoadFromModels(models); } if (c.HasFlag(Components.Display)) { res.Display = DisplayConfig.LoadFromModels(models); } if (c.HasFlag(Components.Export)) { res.Export = ExportConfig.LoadFromModels(models); } return(res); }
public static DisplayConfig LoadFromModels(ModelsEx models) { var res = new DisplayConfig(); res.LinearInterpolation = models.Display.LinearInterpolation; res.DisplayNegative = models.Display.DisplayNegative; res.AlphaBackground = models.Settings.AlphaBackground; // pixel display res.TexelRadius = models.Display.TexelRadius; res.TexelDecimalPlaces = models.Settings.TexelDecimalPlaces; res.TexelDisplayMode = models.Settings.TexelDisplay; return(res); }