/// <summary> A MagickWand extension method that overlay image. </summary> /// <param name="wand"> The wand to act on. </param> /// <param name="compose"> The compose. </param> /// <param name="x"> The x coordinate. </param> /// <param name="y"> The y coordinate. </param> /// <param name="width"> The width. </param> /// <param name="height"> The height. </param> /// <param name="magickwand"> The magickwand. </param> internal static void OverlayImage(this ImageWand wand, CompositeOperator compose, double x, double y, double width, double height, MagickWand magickwand) { using (var draw = new DrawingWand()) { draw.DrawComposite(compose, x, y, width, height, magickwand.CurrentImage); wand.DrawImage(draw); } }
/// <summary> /// Initializes a new instance of the <see cref="DrawableComposite"/> class. /// </summary> /// <param name="x">The X coordinate.</param> /// <param name="y">The Y coordinate.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public DrawableComposite(double x, double y, CompositeOperator compose, MagickImage image) : this(image) { X = x; Y = y; Width = _Image.Width; Height = _Image.Height; Compose = compose; }
///<summary> /// Creates a new DrawableCompositeImage instance. ///</summary> ///<param name="x">The X coordinate.</param> ///<param name="y">The Y coordinate.</param> ///<param name="compose">The algorithm to use.</param> ///<param name="image">The image to draw.</param> public DrawableCompositeImage(double x, double y, CompositeOperator compose, MagickImage image) : this(image) { X = x; Y = y; Width = image.Width; Height = image.Height; Compose = compose; }
public CompositeFilterEffect(string filterInput1, string filterInput2, CompositeOperator @operator, string resultName) : base(filterInput1, resultName) { SetAttr(new { in1 = filterInput1, in2 = filterInput2, }); SetAttr("operator", @operator.ToString().Camelize()); }
/// <summary> /// Initializes a new instance of the <see cref="DrawableComposite"/> class. /// </summary> /// <param name="x">The X coordinate.</param> /// <param name="y">The Y coordinate.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public DrawableComposite(double x, double y, CompositeOperator compose, IMagickImage <QuantumType> image) : this(image) { X = x; Y = y; Width = _image.Width; Height = _image.Height; Compose = compose; }
public CompositeFilter(IFilterComponent secondInput, CompositeOperator operation, decimal k1, decimal k2, decimal k3, decimal k4) { SecondInput = secondInput; Operation = operation; K1 = k1; K2 = k2; K3 = k3; K4 = k4; }
///<summary> /// Creates a new DrawableCompositeImage instance. ///</summary> ///<param name="offset">The offset from origin.</param> ///<param name="compose">The algorithm to use.</param> ///<param name="image">The image to draw.</param> public DrawableCompositeImage(MagickGeometry offset, CompositeOperator compose, MagickImage image) : this(image) { Throw.IfNull("offset", offset); X = offset.X; Y = offset.Y; Width = offset.Width; Height = offset.Height; Compose = compose; }
/// <summary> /// Initializes a new instance of the <see cref="DrawableComposite"/> class. /// </summary> /// <param name="offset">The offset from origin.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public DrawableComposite(IMagickGeometry offset, CompositeOperator compose, IMagickImage <QuantumType> image) : this(image) { Throw.IfNull(nameof(offset), offset); X = offset.X; Y = offset.Y; Width = offset.Width; Height = offset.Height; Compose = compose; }
/// <summary> /// Initializes a new instance of <see cref="CompositeExpression"/>, with the specified left, right and operator arguments. /// </summary> /// <param name="left">The left hand expression to compare.</param> /// <param name="right">The right hand expression to compare.</param> /// <param name="type">The operator to use when comparing the left and right hand predicates.</param> public CompositeExpression(AExpression left, AExpression right, CompositeOperator type = CompositeOperator.And) { if (left == null) { throw new ArgumentNullException(nameof(left)); } if (right == null) { throw new ArgumentNullException(nameof(right)); } Left = left; Right = right; Operator = type; }
/// <summary> Magick composite image. </summary> /// <param name="wand"> Handle of the wand. </param> /// <param name="sourcePtr"> Source pointer. </param> /// <param name="compositeOperator"> The composite operator. </param> /// <param name="x"> The x coordinate. </param> /// <param name="y"> The y coordinate. </param> /// <returns> An int. </returns> internal static bool MagickCompositeImage(IntPtr wand, IntPtr sourcePtr, CompositeOperator compositeOperator, int x, int y) { return MagickCompositeImageInternal(wand, sourcePtr, compositeOperator, (IntPtr)x, (IntPtr)y); }
public static extern MagickBooleanType MagickCompositeImageGravity(IntPtr magickWand1, IntPtr magickWand2, CompositeOperator op3, [In] GravityType gravityType4);
public BlendMode(string name, CompositeOperator blendType) { this.name = name; this.blendType = blendType; }
public BlendMode(string name) { this.name = name; this.blendType = CompositeOperator.No; }
public static extern MagickBooleanType DrawComposite(IntPtr drawingWand1, CompositeOperator op2, [In] double val3, [In] double val4, [In] double val5, [In] double val6, IntPtr magickWand7);
public void Composite(double x, double y, double width, double height, CompositeOperator compositeOperator, IMagickImage image) => _nativeInstance.Composite(x, y, width, height, compositeOperator, image);
public void CompositeImage(MagickImage sourceImage, CompositeOperator compose, int x, int y) { this.ExecuteChecked(ImageMagick.MagickCompositeImage, sourceImage.Handle, (int)compose, x, y); }
/// <summary> Gets or sets a value indicating whether the stroke antialias. </summary> /// <value> true if stroke antialias, false if not. </value> /*private bool StrokeAntialias * { * get { return DrawingWandInterop.DrawGetStrokeAntialias(this); } * set { DrawingWandInterop.DrawSetStrokeAntialias(this, value); } * } * * /// <summary> Gets or sets the fill opacity. </summary> * /// <value> The fill opacity. </value> * private double FillOpacity * { * get { return DrawingWandInterop.DrawGetFillOpacity(this); } * set { DrawingWandInterop.DrawSetFillOpacity(this, value); } * } * * /// <summary> Gets or sets the opacity. </summary> * /// <value> The opacity. </value> * private double Opacity * { * get { return DrawingWandInterop.DrawGetOpacity(this); } * set { DrawingWandInterop.DrawSetOpacity(this, value); } * } * * /// <summary> Gets or sets the vector graphics. </summary> * /// <value> The vector graphics. </value> * private string VectorGraphics * { * get { return DrawingWandInterop.DrawGetVectorGraphics(this); } * set { DrawingWandInterop.DrawSetVectorGraphics(this, value); } * }*/ /// <summary> Draw composite. </summary> /// <param name="compose"> The compose. </param> /// <param name="x"> The x coordinate. </param> /// <param name="y"> The y coordinate. </param> /// <param name="width"> The width. </param> /// <param name="height"> The height. </param> /// <param name="imageWand"> The magickwand. </param> /// <returns> true if it succeeds, false if it fails. </returns> internal bool DrawComposite(CompositeOperator compose, double x, double y, double width, double height, ImageWand imageWand) { return(this.CheckErrorBool(DrawingWandInterop.DrawComposite(this, compose, x, y, width, height, imageWand.MagickWand.Handle))); }
public DrawableCompositeImage(MagickGeometry offset, CompositeOperator compose, MagickImage image) : base(AssemblyHelper.CreateInstance(Types.DrawableCompositeImage, new Type[] {Types.MagickGeometry, Types.CompositeOperator, Types.MagickImage}, GraphicsMagick.MagickGeometry.GetInstance(offset), compose, GraphicsMagick.MagickImage.GetInstance(image))) { }
public void Composite(double x, double y, double width, double height, CompositeOperator compositeOperator, MagickImage image) { IntPtr exception = IntPtr.Zero; #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU NativeMethods.X64.DrawingWand_Composite(Instance, x, y, width, height, (UIntPtr)compositeOperator, MagickImage.GetInstance(image), out exception); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU NativeMethods.X86.DrawingWand_Composite(Instance, x, y, width, height, (UIntPtr)compositeOperator, MagickImage.GetInstance(image), out exception); #endif CheckException(exception); }
internal static extern bool DrawComposite(IntPtr wand, CompositeOperator compose, double x, double y, double width, double height, IntPtr magickwand);
public void Composite(double x, double y, double width, double height, CompositeOperator compositeOperator, MagickImage image) { _NativeInstance.Composite(x, y, width, height, compositeOperator, image); }
/// <summary> /// Creates a new DrawableCompositeImage instance. /// </summary> /// <param name="x">The X coordinate.</param> /// <param name="y">The Y coordinate.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public Drawables Composite(double x, double y, CompositeOperator compose, MagickImage image) { _Drawables.Add(new DrawableComposite(x, y, compose, image)); return this; }
/// <summary> /// Creates a new DrawableCompositeImage instance. /// </summary> /// <param name="offset">The offset from origin.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public Drawables Composite(MagickGeometry offset, CompositeOperator compose, MagickImage image) { _Drawables.Add(new DrawableComposite(offset, compose, image)); return this; }
public void DrawComposite(CompositeOperator compose, double x, double y, double width, double height, MagickWand magickWand) { Check(MagickWandApi.DrawComposite(Wand, compose, x, y, width, height, magickWand.Wand)); }
/// <summary> Magick composite image. </summary> /// <param name="wand"> Handle of the wand. </param> /// <param name="sourcePtr"> Source pointer. </param> /// <param name="compositeOperator"> The composite operator. </param> /// <param name="x"> The x coordinate. </param> /// <param name="y"> The y coordinate. </param> /// <returns> An int. </returns> internal static bool MagickCompositeImage(IntPtr wand, IntPtr sourcePtr, CompositeOperator compositeOperator, int x, int y) { return(MagickCompositeImageInternal(wand, sourcePtr, compositeOperator, (IntPtr)x, (IntPtr)y)); }
private static extern bool MagickSetImageCompose(IntPtr wand, CompositeOperator compose);
public DrawableCompositeImage(Double x, Double y, CompositeOperator compose, MagickImage image) : base(AssemblyHelper.CreateInstance(Types.DrawableCompositeImage, new Type[] {typeof(Double), typeof(Double), Types.CompositeOperator, Types.MagickImage}, x, y, compose, GraphicsMagick.MagickImage.GetInstance(image))) { }
/// <summary> /// Applies the DrawableComposite operation to the <see cref="Drawables" />. /// </summary> /// <param name="x">The X coordinate.</param> /// <param name="y">The Y coordinate.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> /// <returns>The <see cref="Drawables" /> instance.</returns> public IDrawables <QuantumType> Composite(double x, double y, CompositeOperator compose, IMagickImage <QuantumType> image) { _drawables.Add(new DrawableComposite(x, y, compose, image)); return(this); }
/// <summary> Color matrix image. </summary> /// <param name="matrix"> The matrix. </param> /// <returns> true if it succeeds, false if it fails. </returns> /*private bool ColorMatrixImage(double[,] matrix) * { * return this.ActivateImageWand(() => this.MagickWand.CheckErrorBool(ImageWandInterop.MagickColorMatrixImage(this.MagickWand, matrix))); * }*/ /// <summary> Composite image. </summary> /// <param name="sourcePtr"> Source pointer. </param> /// <param name="compositeOperator"> The composite operator. </param> /// <param name="x"> The x coordinate. </param> /// <param name="y"> The y coordinate. </param> /// <returns> true if it succeeds, false if it fails. </returns> public bool CompositeImage(MagickWand sourcePtr, CompositeOperator compositeOperator, int x, int y) { return(this.ActivateImageWand(() => this.MagickWand.CheckErrorBool(ImageWandInterop.MagickCompositeImage(this.MagickWand, sourcePtr, compositeOperator, x, y)))); }
private static extern bool MagickCompositeImageInternal(IntPtr wand, IntPtr sourcePtr, CompositeOperator compositeOperator, IntPtr x, IntPtr y);
/// <summary> /// Adds a new instance of the <see cref="DrawableComposite" /> class to the <see cref="Drawables" />. /// </summary> /// <param name="x">The X coordinate.</param> /// <param name="y">The Y coordinate.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> /// <returns>The <see cref="Drawables" /> instance.</returns> public Drawables Composite(double x, double y, CompositeOperator compose, MagickImage image) { _Drawables.Add(new DrawableComposite(x, y, compose, image)); return(this); }
/// <summary> /// Applies the DrawableComposite operation to the <see cref="Drawables" />. /// </summary> /// <param name="offset">The offset from origin.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> /// <returns>The <see cref="Drawables" /> instance.</returns> public IDrawables <QuantumType> Composite(IMagickGeometry offset, CompositeOperator compose, IMagickImage <QuantumType> image) { _drawables.Add(new DrawableComposite(offset, compose, image)); return(this); }
public void Composite(Image sourceImage, CompositeOperator compose, int x, int y) { this.image.CompositeImage(sourceImage.image, compose, x, y); }
/// <summary> /// Initializes a new instance of the <see cref="DrawableComposite"/> class. /// </summary> /// <param name="offset">The offset from origin.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> public DrawableComposite(MagickGeometry offset, CompositeOperator compose, MagickImage image) : this(image) { Throw.IfNull("offset", offset); X = offset.X; Y = offset.Y; Width = offset.Width; Height = offset.Height; Compose = compose; }
public void CompositeGravity(MagickImage image, Gravity gravity, CompositeOperator compose) { IntPtr exception = IntPtr.Zero; #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU NativeMethods.X64.MagickImage_CompositeGravity(Instance, MagickImage.GetInstance(image), (UIntPtr)gravity, (UIntPtr)compose, out exception); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU NativeMethods.X86.MagickImage_CompositeGravity(Instance, MagickImage.GetInstance(image), (UIntPtr)gravity, (UIntPtr)compose, out exception); #endif CheckException(exception); }
/// <summary> /// Adds a new instance of the <see cref="DrawableComposite" /> class to the <see cref="Drawables" />. /// </summary> /// <param name="offset">The offset from origin.</param> /// <param name="compose">The algorithm to use.</param> /// <param name="image">The image to draw.</param> /// <returns>The <see cref="Drawables" /> instance.</returns> public Drawables Composite(MagickGeometry offset, CompositeOperator compose, MagickImage image) { _Drawables.Add(new DrawableComposite(offset, compose, image)); return(this); }
public DrawableCompositeImage(MagickGeometry offset, CompositeOperator compose, MagickImage image) : base(AssemblyHelper.CreateInstance(Types.DrawableCompositeImage, new Type[] { Types.MagickGeometry, Types.CompositeOperator, Types.MagickImage }, GraphicsMagick.MagickGeometry.GetInstance(offset), compose, GraphicsMagick.MagickImage.GetInstance(image))) { }
public CompositeFilterEffect Composite(string filterInput1, string filterInput2, CompositeOperator @operator, string resultName = null) { return(AddChild(new CompositeFilterEffect(filterInput1, filterInput2, @operator, resultName))); }
public DrawableCompositeImage(Double x, Double y, CompositeOperator compose, MagickImage image) : base(AssemblyHelper.CreateInstance(Types.DrawableCompositeImage, new Type[] { typeof(Double), typeof(Double), Types.CompositeOperator, Types.MagickImage }, x, y, compose, GraphicsMagick.MagickImage.GetInstance(image))) { }
public static extern MagickBooleanType MagickSetImageCompose(IntPtr magickWand1, CompositeOperator op2);
public static extern MagickBooleanType MagickCompositeImageChannel(IntPtr magickWand1, [In] ChannelType channelType2, IntPtr magickWand3, CompositeOperator op4, IntPtr ssizetVal5, IntPtr ssizetVal6);
public static extern MagickBooleanType MagickCompositeLayers(IntPtr magickWand1, IntPtr magickWand2, CompositeOperator op3, IntPtr ssizetVal4, IntPtr ssizetVal5);
private int GetIndex(CompositeOperator composite) { return(blendTypes.ToList().FindIndex(itm => itm.blendType == composite)); }