public void ConstructorOne() { var layer = new TextLayer(_image, "Hello World", "Sans", new FontSize(32, Unit.Pixel)); _image.InsertLayer(layer, 0); Assert.AreEqual(1, _image.Layers.Count); }
public void AddTwoDifferentLayerTypes() { var layer = new Layer(_image, "test1", ImageType.Rgb); _image.InsertLayer(layer, null, 0); var fontSize = new FontSize(32, Unit.Pixel); var textLayer = new TextLayer(_image, "Hello World", "Sans", fontSize); _image.InsertLayer(textLayer, null, 0); Assert.AreEqual(2, _image.Layers.Count); Assert.IsTrue(_image.Layers[0] is TextLayer); Assert.IsTrue(_image.Layers[1] is Layer); }
public void Init() { _image = new Image(_width, _height, ImageBaseType.Rgb); var layer = new Layer(_image, "test", ImageType.Rgb); _image.InsertLayer(layer, 0); }
public void ConstructorFromTextLayer() { var layer = new TextLayer(_image, "Hello World", "Sans", new FontSize(32, Unit.Pixel)); _image.InsertLayer(layer, 0); var vectors = new Vectors(_image, layer); Assert.IsTrue(vectors.IsValid); Assert.IsTrue(vectors.Strokes.Count > 0); }
protected Image NewImage(int width, int height, ImageBaseType baseType, ImageType type, string filename) { var image = new Image(width, height, baseType) { Filename = filename }; var layer = new Layer(image, "Background", type); image.InsertLayer(layer, 0); return(image); }
public void Parent() { var group = new LayerGroup(_image); _image.InsertLayer(group, null, 0); var layer = new Layer(_image, "test1", ImageType.Rgb); _image.InsertLayer(layer, group, 0); Assert.IsTrue(layer.Parent is LayerGroup); Assert.IsNull(layer.Parent.Parent); }
public void CreateMask() { var layer = new Layer(_image, "test", ImageType.Rgba); layer.AddAlpha(); _image.InsertLayer(layer, 0); var mask = layer.CreateMask(AddMaskType.White); Assert.IsTrue(mask is Channel); Assert.AreEqual(true, mask.IsLayerMask); Assert.AreEqual(true, mask.IsChannel); layer.Mask = mask; Assert.AreEqual(layer, mask.Layer); }
public void ConstructorFour() { var layer = new Layer(_image, "test", ImageType.Rgb); _image.InsertLayer(layer, 0); var image = new Image(_width, _height, ImageBaseType.Rgb); layer = new Layer(_image, image, "new_from_visible"); image.InsertLayer(layer, 0); Assert.AreEqual(1, image.Layers.Count); Assert.AreEqual(image.Width, layer.Width); Assert.AreEqual(image.Height, layer.Height); Assert.AreEqual(100, layer.Opacity); Assert.AreEqual(LayerModeEffects.Normal, layer.Mode); image.Delete(); }
public void ConstructorOne() { var layer = new Layer(_image, "test", _width, _height, ImageType.Rgb, 100, LayerModeEffects.Normal); Assert.AreEqual(ImageType.Rgb, layer.Type); _image.InsertLayer(layer, 0); Assert.AreEqual(1, _image.Layers.Count); }
protected Image NewImage(int width, int height, ImageBaseType baseType, ImageType type, string filename) { var image = new Image(width, height, baseType) {Filename = filename}; var layer = new Layer(image, "Background", type); image.InsertLayer(layer, 0); return image; }
public void Init() { _image = new Image(_width, _height, ImageBaseType.Rgb); var layer = new Layer(_image, "test", ImageType.Rgb); _image.InsertLayer(layer, 0); }
public void Insert(Layer layer, int position) { Image.InsertLayer(layer, this, position); }
public void ConstructorFour() { var layer = new Layer(_image, "test", ImageType.Rgb); _image.InsertLayer(layer, 0); var image = new Image(_width, _height, ImageBaseType.Rgb); layer = new Layer(_image, image, "new_from_visible"); image.InsertLayer(layer, 0); Assert.AreEqual(1, image.Layers.Count); Assert.AreEqual(image.Width, layer.Width); Assert.AreEqual(image.Height, layer.Height); Assert.AreEqual(100, layer.Opacity); Assert.AreEqual(LayerModeEffects.Normal, layer.Mode); image.Delete(); }
public void ActiveLayer() { var layer = new Layer(_image, "test", ImageType.Rgb); _image.InsertLayer(layer, 0); var active = _image.ActiveLayer; Assert.AreEqual(layer.Name, active.Name); }