Пример #1
0
        /// <summary>
        /// Selects the lighter of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Lighten(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 lighten = Vector4BlendTransforms.Lighten(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(lighten));
        }
Пример #2
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the backdrop color value.
        /// <remarks>
        /// Source colors overlay the backdrop while preserving its highlights and shadows.
        /// The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness
        /// of the backdrop.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Overlay(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 overlay = Vector4BlendTransforms.Overlay(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(overlay));
        }
Пример #3
0
        /// <summary>
        /// Selects the darker of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Darken(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 darken = Vector4BlendTransforms.Darken(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(darken));
        }
Пример #4
0
        /// <summary>
        /// Blends two colors by multiplication.
        /// <remarks>
        /// The source color is multiplied by the destination color and replaces the destination.
        /// The resultant color is always at least as dark as either the source or destination color.
        /// Multiplying any color with black results in black. Multiplying any color with white preserves the
        /// original color.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Multiply(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 multiply = Vector4BlendTransforms.Multiply(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(multiply));
        }
Пример #5
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the backdrop color value.
        /// <remarks>
        /// Source colors overlay the backdrop while preserving its highlights and shadows.
        /// The backdrop color is not replaced but is mixed with the source color to reflect the lightness or darkness
        /// of the backdrop.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Overlay(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 overlay = Vector4BlendTransforms.Overlay(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref overlay));
        }
Пример #6
0
        /// <summary>
        /// Darkens the backdrop color to reflect the source color. Painting with white produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector ColorBurn(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 burn = Vector4BlendTransforms.Burn(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(burn));
        }
Пример #7
0
        /// <summary>
        /// Produces an effect similar to that of the <see cref="Difference"/> mode but lower in contrast. Painting with white
        /// inverts the backdrop color; painting with black produces no change
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Exclusion(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 exclusion = Vector4BlendTransforms.Exclusion(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(exclusion));
        }
Пример #8
0
        /// <summary>
        /// Subtracts the darker of the two constituent colors from the lighter color.
        /// Painting with white inverts the backdrop color; painting with black produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Difference(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 difference = Vector4BlendTransforms.Difference(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref difference));
        }
Пример #9
0
        /// <summary>
        /// Produces an effect similar to that of the <see cref="Difference"/> mode but lower in contrast. Painting with white
        /// inverts the backdrop color; painting with black produces no change
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Exclusion(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 exclusion = Vector4BlendTransforms.Exclusion(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref exclusion));
        }
Пример #10
0
        /// <summary>
        /// Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 ColorDodge(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 dodge = Vector4BlendTransforms.Dodge(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref dodge));
        }
Пример #11
0
        /// <summary>
        /// Darkens the backdrop color to reflect the source color. Painting with white produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 ColorBurn(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 burn = Vector4BlendTransforms.Burn(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref burn));
        }
Пример #12
0
        /// <summary>
        /// Darkens or lightens the colors, depending on the source color value. The effect is similar to shining
        /// a diffused spotlight on the backdrop.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 SoftLight(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 softlight = Vector4BlendTransforms.SoftLight(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref softlight));
        }
Пример #13
0
        /// <summary>
        /// Selects the lighter of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is lighter; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Lighten(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 lighten = Vector4BlendTransforms.Lighten(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref lighten));
        }
Пример #14
0
        /// <summary>
        /// Selects the darker of the backdrop and source colors.
        /// The backdrop is replaced with the source where the source is darker; otherwise, it is left unchanged.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Darken(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 darken = Vector4BlendTransforms.Darken(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref darken));
        }
Пример #15
0
        /// <summary>
        /// Darkens or lightens the colors, depending on the source color value. The effect is similar to shining
        /// a diffused spotlight on the backdrop.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector SoftLight(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 softlight = Vector4BlendTransforms.SoftLight(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(softlight));
        }
Пример #16
0
        /// <summary>
        /// The blending formula simply selects the source color.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Normal(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 normal = Vector4BlendTransforms.Normal(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref normal));
        }
Пример #17
0
        /// <summary>
        /// Brightens the backdrop color to reflect the source color. Painting with black produces no changes.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector ColorDodge(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 dodge = Vector4BlendTransforms.Dodge(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(dodge));
        }
Пример #18
0
        /// <summary>
        /// Blends two colors by multiplication.
        /// <remarks>
        /// The source color is multiplied by the destination color and replaces the destination.
        /// The resultant color is always at least as dark as either the source or destination color.
        /// Multiplying any color with black results in black. Multiplying any color with white preserves the
        /// original color.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Multiply(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 multiply = Vector4BlendTransforms.Multiply(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref multiply));
        }
Пример #19
0
        /// <summary>
        /// Subtracts the darker of the two constituent colors from the lighter color.
        /// Painting with white inverts the backdrop color; painting with black produces no change.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Difference(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 difference = Vector4BlendTransforms.Difference(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(difference));
        }
Пример #20
0
        /// <summary>
        /// Multiplies the complements of the backdrop and source color values, then complements the result.
        /// <remarks>
        /// The result color is always at least as light as either of the two constituent colors. Screening any
        /// color with white produces white; screening with black leaves the original color unchanged.
        /// The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 Screen(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 subtract = Vector4BlendTransforms.Screen(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref subtract));
        }
Пример #21
0
        /// <summary>
        /// The blending formula simply selects the source color.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Normal(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 normal = Vector4BlendTransforms.Normal(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(normal));
        }
Пример #22
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the source color value. The effect is similar to
        /// shining a harsh spotlight on the backdrop.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector HardLight(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 hardlight = Vector4BlendTransforms.HardLight(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(hardlight));
        }
Пример #23
0
        /// <summary>
        /// Multiplies the complements of the backdrop and source color values, then complements the result.
        /// <remarks>
        /// The result color is always at least as light as either of the two constituent colors. Screening any
        /// color with white produces white; screening with black leaves the original color unchanged.
        /// The effect is similar to projecting multiple photographic slides simultaneously onto a single screen.
        /// </remarks>
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="RgbaVector"/>.
        /// </returns>
        public static RgbaVector Screen(RgbaVector backdrop, RgbaVector source)
        {
            Vector4 subtract = Vector4BlendTransforms.Screen(backdrop.backingVector, source.backingVector);

            return(new RgbaVector(subtract));
        }
Пример #24
0
        /// <summary>
        /// Multiplies or screens the colors, depending on the source color value. The effect is similar to
        /// shining a harsh spotlight on the backdrop.
        /// </summary>
        /// <param name="backdrop">The backdrop color.</param>
        /// <param name="source">The source color.</param>
        /// <returns>
        /// The <see cref="Rgba32"/>.
        /// </returns>
        public static Rgba32 HardLight(Rgba32 backdrop, Rgba32 source)
        {
            Vector4 hardlight = Vector4BlendTransforms.HardLight(backdrop.ToVector4(), source.ToVector4());

            return(PackNew(ref hardlight));
        }