public void GetTagsForVisualization_ReturnTagsWithCorrectFontSize() { fontSettings.MinFontSize = 1; var actual = tagCreator.GetTagsForVisualization().ToArray(); var expectedWords = new[] { "a", "c" }; actual.Length.Should().Be(expectedWords.Length); for (var i = 0; i < expectedWords.Length; i++) { actual[i].Text.Should().Be(expectedWords[i]); } }
public Result <Graphics> PaintTags() { var tags = tagCreator.GetTagsForVisualization(); var startDrawingResult = imageHolder.StartDrawing(); if (!startDrawingResult.IsSuccess) { return(startDrawingResult); } using (var graphics = startDrawingResult.Value) { graphics.Clear(colorSettingsProvider.ColorSettings.BackgroundColor); var result = new Result <Graphics>(null, graphics); foreach (var tag in tags) { result = PaintTag(tag, graphics); if (!result.IsSuccess) { return(result); } } imageHolder.UpdateUi(); return(result); } }
public void RenewGradient() { tagsCount = tagCreator.GetTagsForVisualization().Count(); deltaR = GetDelta(ColorTo.R, ColorFrom.R); deltaG = GetDelta(ColorTo.G, ColorFrom.G); deltaB = GetDelta(ColorTo.B, ColorFrom.B); currentColor = ColorFrom; }