public void AddChannel() { int before = _image.Channels.Count; var channel = new Channel(_image, "test", new RGB(0, 255, 0)); _image.AddChannel(channel); Assert.AreEqual(before + 1, _image.Channels.Count); }
public void ChannelConstructorThree() { int before = _image.Channels.Count; var channel = new Channel(_image, ChannelType.Red, "test"); _image.AddChannel(channel, 0); Assert.AreEqual(before + 1, _image.Channels.Count); }
public void GetIndex() { string channelName = "test"; var channel = new Channel(_image, ChannelType.Red, channelName); _image.AddChannel(channel, 0); var channels = _image.Channels; int index = channels.GetIndex(channel); Assert.IsTrue(index == 0); }
public void ChannelConstructorOne() { int before = _image.Channels.Count; var channel = new Channel(_image, "test", _width, _height, 100, new RGB(0, 255, 0)); Assert.IsTrue(channel.IsChannel); _image.AddChannel(channel, 0); Assert.AreEqual(before + 1, _image.Channels.Count); }
public void ThisByIndex() { string channelName = "test"; var channel = new Channel(_image, ChannelType.Red, channelName); _image.AddChannel(channel, 0); var channels = _image.Channels; var found = channels[0]; Assert.IsNotNull(found); Assert.AreEqual(channel.Name, found.Name); }
public void AddChannel(Channel channel, int position) { if (!gimp_image_add_channel(ID, channel.ID, position)) { throw new GimpSharpException(); } }
public void CombineMasks(Channel channel, ChannelOps operation, Offset offset) { CombineMasks(channel, operation, offset.X, offset.Y); }
public Channel(Channel channel) : base(gimp_channel_copy(channel.ID)) { }
public void GetSetShowMasked() { var channel = new Channel(_image, "test", _width, _height, 100, new RGB(0, 255, 0)); _image.AddChannel(channel, 0); channel.ShowMasked = true; Assert.IsTrue(channel.ShowMasked); channel.ShowMasked = false; Assert.IsFalse(channel.ShowMasked); }
public void CombineMasks(Channel channel, ChannelOps operation, int offx, int offy) { if (!gimp_channel_combine_masks(ID, channel.ID, operation, offx, offy)) { throw new GimpSharpException(); } }
public void Combine(Channel channel, ChannelOps operation) { if (!gimp_selection_combine(channel.ID, operation)) { throw new GimpSharpException(); } }
public void GetSetOpacity() { var channel = new Channel(_image, "test", _width, _height, 100, new RGB(0, 255, 0)); _image.AddChannel(channel, 0); Assert.AreEqual(100, channel.Opacity); channel.Opacity = 13; Assert.AreEqual(13, channel.Opacity); }
public void LowerChannel(Channel channel) { if (!gimp_image_lower_channel(ID, channel.ID)) { throw new GimpSharpException(); } }
public void AddChannel(Channel channel) { AddChannel(channel, 0); }
public void InsertChannel(Channel channel, Item parent, int position) { if (!gimp_image_insert_channel(ID, channel.ID, parent != null ? parent.ID : 0, position)) { throw new GimpSharpException(); } }
public void AddChannel(Channel channel, int position = 0) { InsertChannel(channel, null, position); }
public void CombineMasks() { RGB color = new RGB(0, 255, 0); var channelOne = new Channel(_image, "one", color); var channelTwo = new Channel(_image, "two", color); _image.AddChannel(channelOne, 0); _image.AddChannel(channelTwo, 0); channelOne.CombineMasks(channelTwo, ChannelOps.Add, 0, 0); }
public int GetChannelPosition(Channel channel) { return gimp_image_get_channel_position(ID, channel.ID); }
public void GetChannelPosition() { var channel1 = new Channel(_image, "test1", new RGB(0, 255, 0)); _image.AddChannel(channel1); var channel2 = new Channel(_image, "test2", new RGB(0, 255, 0)); _image.AddChannel(channel2); Assert.AreEqual(1, _image.GetItemPosition(channel1)); Assert.AreEqual(0, _image.GetItemPosition(channel2)); }
public void RemoveChannel(Channel channel) { if (!gimp_image_remove_channel(ID, channel.ID)) { throw new GimpSharpException(); } }
public void RaiseChannel() { var channel1 = new Channel(_image, "test1", new RGB(0, 255, 0)); _image.AddChannel(channel1); var channel2 = new Channel(_image, "test2", new RGB(0, 255, 0)); _image.AddChannel(channel2); int position = channel1.Position; _image.RaiseItem(channel1); Assert.AreEqual(position - 1, channel1.Position); Assert.AreEqual(position, channel2.Position); }
public void Load(Channel channel) { if (!gimp_selection_load(channel.ID)) { throw new GimpSharpException(); } }
public void GetSetColor() { RGB color = new RGB(0, 255, 0); var channel = new Channel(_image, "test", _width, _height, 100, color); _image.AddChannel(channel, 0); Assert.AreEqual(color.Bytes, channel.Color.Bytes); RGB red = new RGB(255, 0, 0); channel.Color = red; Assert.AreEqual(red.Bytes, channel.Color.Bytes); }