public static AreEqual ( |
||
expected | ||
actual | ||
Результат | void |
public void ShouldUseTheReadSettings() { using (IMagickImage image = new MagickImage()) { using (FileStream fs = File.OpenRead(Files.Logos.MagickNETSVG)) { byte[] buffer = new byte[fs.Length + 1]; fs.Read(buffer, 0, (int)fs.Length); using (MemoryStream memStream = new MemoryStream(buffer, 0, (int)fs.Length)) { image.Read(memStream, new MagickReadSettings() { Density = new Density(72), }); ColorAssert.AreEqual(new MagickColor("#231f20"), image, 129, 101); } } } }
private void AssertComponent(IMagickImage image, ConnectedComponent component, int id, int x, int y, int width, int height, int area, MagickColor color, int centroidX, int centroidY) { var delta = 2; Assert.AreEqual(id, component.Id); Assert.AreEqual(x, component.X, delta); Assert.AreEqual(y, component.Y, delta); Assert.AreEqual(width, component.Width, delta); Assert.AreEqual(height, component.Height, delta); Assert.AreEqual(area, component.Area, delta); ColorAssert.AreEqual(color, component.Color); Assert.AreEqual(centroidX, component.Centroid.X, delta); Assert.AreEqual(centroidY, component.Centroid.Y, delta); using (IMagickImage componentImage = image.Clone()) { componentImage.Crop(component.ToGeometry(10)); Assert.AreEqual(width + 20, componentImage.Width, delta); Assert.AreEqual(height + 20, componentImage.Height, delta); } }
public void ShouldExecuteTheVariablesScript() { MagickScript script = new MagickScript(Files.Scripts.Variables); script.Variables.Set("width", 120); script.Variables.Set("height", 150); script.Variables["color"] = MagickColors.Yellow; script.Variables["fillColor"] = MagickColors.Red; using (IMagickImage image = new MagickImage(Files.MagickNETIconPNG)) { script.Execute(image); Assert.AreEqual(120, image.Width); Assert.AreEqual(120, image.Height); ColorAssert.AreEqual(MagickColors.Yellow, image, 0, 0); ColorAssert.AreEqual(MagickColors.Yellow, image.Settings.StrokeColor); ColorAssert.AreEqual(MagickColors.Red, image.Settings.FillColor); } }
public void ShouldRenderCorrectly() { using (var image = new MagickImage(MagickColors.White, 210, 210)) { var drawables = new Drawables() .StrokeDashArray(20.0, 10.0) .StrokeLineCap(LineCap.Round) .StrokeAntialias(true) .StrokeWidth(5.0) .FillColor(MagickColors.Transparent) .StrokeColor(MagickColors.OrangeRed) .Rectangle(5, 5, 200, 200); image.Draw(drawables); ColorAssert.AreEqual(MagickColors.OrangeRed, image, 7, 40); ColorAssert.AreEqual(MagickColors.OrangeRed, image, 7, 175); ColorAssert.AreEqual(MagickColors.OrangeRed, image, 200, 30); ColorAssert.AreEqual(MagickColors.OrangeRed, image, 200, 170); } }
public void ShouldCenterSingleCharacter() { var readSettings = new MagickReadSettings() { BackgroundColor = MagickColors.Transparent, FillColor = MagickColors.Red, TextUnderColor = MagickColors.Green, TextGravity = Gravity.Center, Width = 60, }; using (var image = new MagickImage("label:1", readSettings)) { Assert.AreEqual(119, image.Height); ColorAssert.AreEqual(MagickColors.Green, image, 40, 60); ColorAssert.AreEqual(MagickColors.Red, image, 38, 60); ColorAssert.AreEqual(MagickColors.Red, image, 34, 21); ColorAssert.AreEqual(MagickColors.Green, image, 34, 95); } }
public void ShouldSupportMultipleLines() { var readSettings = new MagickReadSettings() { BackgroundColor = MagickColors.Transparent, FillColor = MagickColors.Red, TextUnderColor = MagickColors.Green, TextGravity = Gravity.Center, Width = 60, }; using (var image = new MagickImage("label:1\n2", readSettings)) { Assert.AreEqual(237, image.Height); ColorAssert.AreEqual(MagickColors.Green, image, 42, 158); ColorAssert.AreEqual(MagickColors.Red, image, 44, 158); ColorAssert.AreEqual(MagickColors.Green, image, 34, 137); ColorAssert.AreEqual(MagickColors.Red, image, 34, 212); } }
public void Test_Flatten() { using (IMagickImageCollection collection = new MagickImageCollection()) { ExceptionAssert.Throws <InvalidOperationException>(() => { collection.Flatten(); }); collection.Add(new MagickImage(MagickColors.Brown, 10, 10)); IMagickImage center = new MagickImage(MagickColors.Fuchsia, 4, 4); center.Page = new MagickGeometry(3, 3, 4, 4); collection.Add(center); using (IMagickImage image = collection.Flatten()) { ColorAssert.AreEqual(MagickColors.Brown, image, 0, 0); ColorAssert.AreEqual(MagickColors.Fuchsia, image, 5, 5); } } }
public void Test_OptimizePlus() { using (IMagickImageCollection collection = new MagickImageCollection()) { ExceptionAssert.Throws <InvalidOperationException>(() => { collection.OptimizePlus(); }); collection.Add(new MagickImage(MagickColors.Red, 11, 11)); /* the second image will not be removed if it is a duplicate so we * need to add an extra one. */ collection.Add(new MagickImage(MagickColors.Red, 11, 11)); collection.Add(new MagickImage(MagickColors.Red, 11, 11)); IMagickImage image = new MagickImage(MagickColors.Red, 11, 11); using (var pixels = image.GetPixels()) { pixels.SetPixel(5, 5, new QuantumType[] { 0, Quantum.Max, 0 }); } collection.Add(image); collection.OptimizePlus(); Assert.AreEqual(3, collection.Count); Assert.AreEqual(1, collection[1].Width); Assert.AreEqual(1, collection[1].Height); Assert.AreEqual(-1, collection[1].Page.X); Assert.AreEqual(-1, collection[1].Page.Y); ColorAssert.AreEqual(MagickColors.Red, collection[1], 0, 0); Assert.AreEqual(1, collection[2].Width); Assert.AreEqual(1, collection[2].Height); Assert.AreEqual(5, collection[2].Page.X); Assert.AreEqual(5, collection[2].Page.Y); ColorAssert.AreEqual(MagickColors.Lime, collection[2], 0, 0); } }
public void Test_FillRule() { using (IMagickImage image = new MagickImage(MagickColors.SkyBlue, 100, 60)) { Assert.AreEqual(FillRule.EvenOdd, image.Settings.FillRule); image.Settings.FillRule = FillRule.Nonzero; image.Settings.FillColor = MagickColors.White; image.Settings.StrokeColor = MagickColors.Black; image.Draw(new DrawablePath( new PathMoveToAbs(40, 10), new PathLineToAbs(20, 20), new PathLineToAbs(70, 50), new PathClose(), new PathMoveToAbs(20, 40), new PathLineToAbs(70, 40), new PathLineToAbs(90, 10), new PathClose())); ColorAssert.AreEqual(MagickColors.White, image, 50, 30); } }
public void ShouldCorrectlyOptimizeTheImages() { using (IMagickImageCollection collection = new MagickImageCollection()) { collection.Add(new MagickImage(MagickColors.Red, 11, 11)); var image = new MagickImage(MagickColors.Red, 11, 11); using (var pixels = image.GetPixels()) { pixels.SetPixel(5, 5, new QuantumType[] { 0, Quantum.Max, 0 }); } collection.Add(image); collection.Optimize(); Assert.AreEqual(1, collection[1].Width); Assert.AreEqual(1, collection[1].Height); Assert.AreEqual(5, collection[1].Page.X); Assert.AreEqual(5, collection[1].Page.Y); ColorAssert.AreEqual(MagickColors.Lime, collection[1], 0, 0); } }
public void ShouldAddCorrectLineBreaks2() { var caption = "caption:tex1_124x40_3a277be1b9da51b7_2d0d8f84dc3ccc36_8"; var readSettings = new MagickReadSettings() { BackgroundColor = MagickColors.Transparent, FontPointsize = 39, FillColor = MagickColors.Red, TextUnderColor = MagickColors.Green, TextGravity = Gravity.Center, Width = 450, }; using (IMagickImage image = new MagickImage(caption, readSettings)) { ColorAssert.AreEqual(MagickColors.Green, image, 170, 67); ColorAssert.AreEqual(MagickColors.Red, image, 444, 26); ColorAssert.AreEqual(MagickColors.Red, image, 395, 55); ColorAssert.AreEqual(MagickColors.Red, image, 231, 116); ColorAssert.AreEqual(new MagickColor("#0000"), image, 170, 93); } }
public void ShouldTrimTheBackground() { using (IMagickImage image = new MagickImage("xc:fuchsia", 50, 50)) { ColorAssert.AreEqual(MagickColors.Fuchsia, image, 0, 0); ColorAssert.AreEqual(MagickColors.Fuchsia, image, 49, 49); image.Extent(100, 60, Gravity.Center, MagickColors.Gold); Assert.AreEqual(100, image.Width); Assert.AreEqual(60, image.Height); ColorAssert.AreEqual(MagickColors.Gold, image, 0, 0); ColorAssert.AreEqual(MagickColors.Fuchsia, image, 50, 30); image.Trim(); Assert.AreEqual(50, image.Width); Assert.AreEqual(50, image.Height); ColorAssert.AreEqual(MagickColors.Fuchsia, image, 0, 0); ColorAssert.AreEqual(MagickColors.Fuchsia, image, 49, 49); } }
public void ShouldCopyTheAlphaChannelWithCopyAlpha() { var readSettings = new MagickReadSettings() { BackgroundColor = MagickColors.None, FillColor = MagickColors.White, FontPointsize = 100, }; using (IMagickImage image = new MagickImage("label:Test", readSettings)) { using (IMagickImage alpha = image.Clone()) { alpha.Alpha(AlphaOption.Extract); alpha.Shade(130, 30); alpha.Composite(image, CompositeOperator.CopyAlpha); ColorAssert.AreEqual(new MagickColor("#7fff7fff7fff0000"), alpha, 0, 0); ColorAssert.AreEqual(new MagickColor("#7fff7fff7fffffff"), alpha, 30, 30); } } }
public void ShouldModulateImage() { using (var image = new MagickImage(Files.TestPNG)) { image.Modulate(new Percentage(70), new Percentage(30)); #if Q8 ColorAssert.AreEqual(new MagickColor("#743e3e"), image, 25, 70); ColorAssert.AreEqual(new MagickColor("#0b0b0b"), image, 25, 40); ColorAssert.AreEqual(new MagickColor("#1f3a1f"), image, 75, 70); ColorAssert.AreEqual(new MagickColor("#5a5a5a"), image, 75, 40); ColorAssert.AreEqual(new MagickColor("#3e3e74"), image, 125, 70); ColorAssert.AreEqual(new MagickColor("#a8a8a8"), image, 125, 40); #else ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#72803da83da8", "#747a3eb83eb8")), image, 25, 70); ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#0b2d0b2d0b2d", "#0b5f0b5f0b5f")), image, 25, 40); ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#1ef3397a1ef3", "#1f7c3a781f7c")), image, 75, 70); ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#592d592d592d", "#5ab75ab75ab7")), image, 75, 40); ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#3da83da87280", "#3eb83eb8747a")), image, 125, 70); ColorAssert.AreEqual(new MagickColor(OpenCLValue.Get("#a5aea5aea5ae", "#a88ba88ba88b")), image, 125, 40); #endif } }
public void ShouldApplyTheOperatorToTheImages() { using (var collection = new MagickImageCollection()) { collection.Read(Files.RoseSparkleGIF); collection.Complex(new ComplexSettings { ComplexOperator = ComplexOperator.Conjugate, }); Assert.AreEqual(2, collection.Count); #if Q8 ColorAssert.AreEqual(new MagickColor("#abb4ba01"), collection[1], 10, 10); #elif Q16 ColorAssert.AreEqual(new MagickColor("#aaabb3b4b9ba0001"), collection[1], 10, 10); #else collection[1].Clamp(); ColorAssert.AreEqual(new MagickColor("#0000000000000000"), collection[1], 10, 10); #endif } }
public void Test_Transparent() { MagickColor transparent = null; Color transparentColor = transparent; Assert.AreEqual(Color.Empty, transparentColor); transparent = MagickColors.Transparent; ColorAssert.IsTransparent(transparent.A); ColorAssert.AreEqual(Color.Transparent, transparent); transparent = new MagickColor("transparent"); ColorAssert.IsTransparent(transparent.A); ColorAssert.AreEqual(Color.Transparent, transparent); transparentColor = transparent; Assert.AreEqual(Color.Transparent.R, transparentColor.R); Assert.AreEqual(Color.Transparent.G, transparentColor.G); Assert.AreEqual(Color.Transparent.B, transparentColor.B); Assert.AreEqual(Color.Transparent.A, transparentColor.A); }
public void Test_ComplementaryColor() { ColorRGB color = MagickColors.Red; ColorRGB complementary = color.ComplementaryColor(); ColorAssert.AreEqual(MagickColors.Aqua, complementary); color = MagickColors.Lime; complementary = color.ComplementaryColor(); ColorAssert.AreEqual(MagickColors.Fuchsia, complementary); color = MagickColors.Black; complementary = color.ComplementaryColor(); ColorAssert.AreEqual(MagickColors.Black, complementary); color = MagickColors.White; complementary = color.ComplementaryColor(); ColorAssert.AreEqual(MagickColors.White, complementary); color = new MagickColor("#aabbcc"); complementary = color.ComplementaryColor(); ColorAssert.AreEqual(new MagickColor("#ccbbaa"), complementary); color = new MagickColor(4, 1, 3); complementary = color.ComplementaryColor(); ColorAssert.AreEqual(new MagickColor(1, 4, 1), complementary); color = new MagickColor("#9aa01e"); complementary = color.ComplementaryColor(); #if Q8 ColorAssert.AreEqual(new MagickColor("#231ea0"), complementary); #elif Q16 || Q16HDRI ColorAssert.AreEqual(new MagickColor("#24231e1ea0a0"), complementary); #else #error Not implemented! #endif }
public void ShouldReduceTheColors() { using (var collection = new MagickImageCollection()) { collection.Add(Files.FujiFilmFinePixS1ProJPG); QuantizeSettings settings = new QuantizeSettings { Colors = 3, }; collection.Quantize(settings); #if Q8 ColorAssert.AreEqual(new MagickColor("#2b414f"), collection[0], 120, 140); ColorAssert.AreEqual(new MagickColor("#7b929f"), collection[0], 95, 140); ColorAssert.AreEqual(new MagickColor("#44739f"), collection[0], 300, 150); #else ColorAssert.AreEqual(new MagickColor("#2af841624f09"), collection[0], 120, 140); ColorAssert.AreEqual(new MagickColor("#7b3c92b69f5a"), collection[0], 95, 140); ColorAssert.AreEqual(new MagickColor("#44bc73059f70"), collection[0], 300, 150); #endif } }
public void ShouldMergeTheImages() { using (IMagickImageCollection collection = new MagickImageCollection()) { collection.Read(Files.RoseSparkleGIF); collection.Complex(new ComplexSettings() { Operator = ComplexOperator.Conjugate, SignalToNoiseRatio = 5.5, }); Assert.AreEqual(2, collection.Count); collection[1].Clamp(); #if Q8 ColorAssert.AreEqual(new MagickColor("#db638b"), collection[1], 10, 10); #elif Q16 || Q16HDRI ColorAssert.AreEqual(new MagickColor("#2c2c2b2b2b2b"), collection[1], 10, 10); #else #error Not implemented! #endif } }
public void ShouldAddCorrectLineBreaks6() { var caption = "caption:AAA"; var readSettings = new MagickReadSettings() { BackgroundColor = MagickColors.Transparent, FontPointsize = 72, TextGravity = Gravity.West, FillColor = MagickColors.Black, Width = 40, }; using (IMagickImage image = new MagickImage(caption, readSettings)) { Assert.AreEqual(249, image.Height); ColorAssert.AreEqual(MagickColors.Black, image, 39, 47); ColorAssert.AreEqual(new MagickColor("#0000"), image, 39, 66); ColorAssert.AreEqual(MagickColors.Black, image, 39, 129); ColorAssert.AreEqual(new MagickColor("#0000"), image, 39, 148); ColorAssert.AreEqual(MagickColors.Black, image, 39, 211); ColorAssert.AreEqual(new MagickColor("#0000"), image, 39, 230); } }
public void ShouldSetTheProperties() { DrawableStrokeColor strokeColor = new DrawableStrokeColor(Color.GhostWhite); ColorAssert.AreEqual(MagickColors.GhostWhite, strokeColor.Color); }
public void Constructor_WithColor_ColorPropertyIsCorrect() { DrawableBorderColor borderColor = new DrawableBorderColor(Color.GreenYellow); ColorAssert.AreEqual(MagickColors.GreenYellow, borderColor.Color); }
public void ShouldCreateCorrectColorWhenUsingSystemDrawingColor() { ColorRGB fuchsia = new ColorRGB(Color.Fuchsia); ColorAssert.AreEqual(fuchsia, MagickColors.Fuchsia); }
public void Test_Constructor_Color() { DrawableStrokeColor strokeColor = new DrawableStrokeColor(Color.GhostWhite); ColorAssert.AreEqual(MagickColors.GhostWhite, strokeColor.Color); }
public void Test_Properties() { using (MagickImage image = new MagickImage()) { MagickSettings settings = image.Settings; Assert.AreEqual(true, settings.Adjoin); settings.Adjoin = false; Assert.AreEqual(false, settings.Adjoin); MagickColor alphaColor = new MagickColor("#bd"); ColorAssert.AreEqual(alphaColor, settings.AlphaColor); alphaColor = MagickColors.Tan; settings.AlphaColor = alphaColor; ColorAssert.AreEqual(alphaColor, settings.AlphaColor); MagickColor backgroundColor = new MagickColor("white"); ColorAssert.AreEqual(backgroundColor, settings.BackgroundColor); backgroundColor = new MagickColor("purple"); settings.BackgroundColor = backgroundColor; ColorAssert.AreEqual(backgroundColor, settings.BackgroundColor); MagickColor borderColor = new MagickColor("#df"); ColorAssert.AreEqual(borderColor, settings.BorderColor); borderColor = new MagickColor("orange"); settings.BorderColor = borderColor; ColorAssert.AreEqual(borderColor, settings.BorderColor); Assert.AreEqual(ColorSpace.Undefined, settings.ColorSpace); settings.ColorSpace = ColorSpace.CMYK; Assert.AreEqual(ColorSpace.CMYK, settings.ColorSpace); Assert.AreEqual(ColorType.Undefined, settings.ColorType); settings.ColorType = ColorType.ColorSeparation; Assert.AreEqual(ColorType.ColorSeparation, settings.ColorType); Assert.AreEqual(CompressionMethod.Undefined, settings.CompressionMethod); settings.CompressionMethod = CompressionMethod.BZip; Assert.AreEqual(CompressionMethod.BZip, settings.CompressionMethod); Assert.AreEqual(false, settings.Debug); settings.Debug = true; Assert.AreEqual(true, settings.Debug); settings.Debug = false; PointD density = new PointD(72); Assert.AreEqual(density, settings.Density); density = new PointD(100); settings.Density = density; Assert.AreEqual(density, settings.Density); density = new PointD(50, 10); settings.Density = density; Assert.AreEqual(density, settings.Density); Assert.AreEqual(Endian.Undefined, settings.Endian); settings.Endian = Endian.MSB; Assert.AreEqual(Endian.MSB, settings.Endian); MagickColor fillColor = MagickColors.Black; ColorAssert.AreEqual(fillColor, settings.FillColor); fillColor = new MagickColor("purple"); settings.FillColor = fillColor; ColorAssert.AreEqual(fillColor, settings.FillColor); using (MagickImage fillPattern = new MagickImage(Files.CirclePNG)) { Assert.AreEqual(null, settings.FillPattern); settings.FillPattern = fillPattern; Assert.AreEqual(fillPattern, settings.FillPattern); } Assert.AreEqual(FillRule.EvenOdd, settings.FillRule); settings.FillRule = FillRule.Nonzero; Assert.AreEqual(FillRule.Nonzero, settings.FillRule); Assert.AreEqual(null, settings.Font); settings.Font = "Comic Sans"; Assert.AreEqual("Comic Sans", settings.Font); Assert.AreEqual(null, settings.FontFamily); settings.FontFamily = "Trajan"; Assert.AreEqual("Trajan", settings.FontFamily); Assert.AreEqual(0, settings.FontPointsize); settings.FontPointsize = 60; Assert.AreEqual(60, settings.FontPointsize); Assert.AreEqual(FontStyleType.Undefined, settings.FontStyle); settings.FontStyle = FontStyleType.Oblique; Assert.AreEqual(FontStyleType.Oblique, settings.FontStyle); Assert.AreEqual(FontWeight.Undefined, settings.FontWeight); settings.FontWeight = FontWeight.ExtraBold; Assert.AreEqual(FontWeight.ExtraBold, settings.FontWeight); Assert.AreEqual(MagickFormat.Unknown, settings.Format); settings.Format = MagickFormat.WebP; Assert.AreEqual(MagickFormat.WebP, settings.Format); MagickGeometry page = new MagickGeometry(0, 0, 0, 0); Assert.AreEqual(page, settings.Page); page = new MagickGeometry(0, 0, 10, 10); settings.Page = page; Assert.AreEqual(page, settings.Page); Assert.AreEqual(true, settings.StrokeAntiAlias); settings.StrokeAntiAlias = false; Assert.AreEqual(false, settings.StrokeAntiAlias); MagickColor strokeColor = new MagickColor(0, 0, 0, 0); ColorAssert.AreEqual(strokeColor, settings.StrokeColor); strokeColor = MagickColors.Fuchsia; settings.StrokeColor = strokeColor; ColorAssert.AreEqual(strokeColor, settings.StrokeColor); Assert.AreEqual(null, settings.StrokeDashArray); double[] dashArray = new double[] { 1.0, 2.0, 3.0 }; settings.StrokeDashArray = dashArray; CollectionAssert.AreEqual(dashArray, settings.StrokeDashArray); Assert.AreEqual(0, settings.StrokeDashOffset); settings.StrokeDashOffset = 5; Assert.AreEqual(5, settings.StrokeDashOffset); Assert.AreEqual(LineCap.Butt, settings.StrokeLineCap); settings.StrokeLineCap = LineCap.Round; Assert.AreEqual(LineCap.Round, settings.StrokeLineCap); Assert.AreEqual(LineJoin.Miter, settings.StrokeLineJoin); settings.StrokeLineJoin = LineJoin.Round; Assert.AreEqual(LineJoin.Round, settings.StrokeLineJoin); Assert.AreEqual(10, settings.StrokeMiterLimit); settings.StrokeMiterLimit = 8; Assert.AreEqual(8, settings.StrokeMiterLimit); using (MagickImage strokePattern = new MagickImage(Files.MagickNETIconPNG)) { Assert.AreEqual(null, settings.StrokePattern); settings.StrokePattern = strokePattern; Assert.AreEqual(strokePattern, settings.StrokePattern); } Assert.AreEqual(1, settings.StrokeWidth); settings.StrokeWidth = 9.5; Assert.AreEqual(9.5, settings.StrokeWidth); Assert.AreEqual(true, settings.TextAntiAlias); settings.TextAntiAlias = false; Assert.AreEqual(false, settings.TextAntiAlias); Assert.AreEqual(TextDirection.Undefined, settings.TextDirection); settings.TextDirection = TextDirection.RightToLeft; Assert.AreEqual(TextDirection.RightToLeft, settings.TextDirection); Assert.AreEqual(null, settings.TextEncoding); settings.TextEncoding = Encoding.Unicode; Assert.AreEqual(Encoding.Unicode, settings.TextEncoding); Assert.AreEqual(Gravity.Undefined, settings.TextGravity); settings.TextGravity = Gravity.North; Assert.AreEqual(Gravity.North, settings.TextGravity); Assert.AreEqual(0, settings.TextInterlineSpacing); settings.TextInterlineSpacing = 3.4; Assert.AreEqual(3.4, settings.TextInterlineSpacing); Assert.AreEqual(0, settings.TextInterwordSpacing); settings.TextInterwordSpacing = 7.8; Assert.AreEqual(7.8, settings.TextInterwordSpacing); Assert.AreEqual(0, settings.TextKerning); settings.TextKerning = 6.2; Assert.AreEqual(6.2, settings.TextKerning); MagickColor underColor = new MagickColor(0, 0, 0, 0); ColorAssert.AreEqual(underColor, settings.TextUnderColor); underColor = new MagickColor("yellow"); settings.TextUnderColor = underColor; ColorAssert.AreEqual(underColor, settings.TextUnderColor); Assert.AreEqual(false, settings.Verbose); settings.Verbose = true; Assert.AreEqual(true, settings.Verbose); } }
public void Constructor_WithColor_ColorPropertyIsCorrect() { DrawableFillColor fillColor = new DrawableFillColor(Color.DarkKhaki); ColorAssert.AreEqual(MagickColors.DarkKhaki, fillColor.Color); }
public void Test_Constructor_Color() { DrawableFillColor fillColor = new DrawableFillColor(Color.DarkKhaki); ColorAssert.AreEqual(MagickColors.DarkKhaki, fillColor.Color); }
public void Test_Constructor_Color() { DrawableBorderColor borderColor = new DrawableBorderColor(Color.GreenYellow); ColorAssert.AreEqual(MagickColors.GreenYellow, borderColor.Color); }
public void Test_Constructor_Color() { DrawableTextUnderColor textUnderColor = new DrawableTextUnderColor(Color.Violet); ColorAssert.AreEqual(MagickColors.Violet, textUnderColor.Color); }
public void Constructor_WithColor_ColorPropertyIsCorrect() { DrawableStrokeColor strokeColor = new DrawableStrokeColor(Color.GhostWhite); ColorAssert.AreEqual(MagickColors.GhostWhite, strokeColor.Color); }