Ejemplo n.º 1
0
 public ColorMatrixFilter(ColorMatrix matrix = null)
 {
     if (matrix != null)
     {
         ColorEffect.Matrix = matrix;
         ColorEffect.UpdateShaderMatrix();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Concatenates the current matrix with another one.
 /// </summary>
 public void ConcatColorMatrix(ColorMatrix colorMatrix)
 {
     ColorEffect.Matrix.ConcatColorMatrix(colorMatrix);
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Changes the hue of the image. Typical values are in the range(-1, 1).
 /// </summary>
 public void AdjustHue(float hue)
 {
     ColorEffect.Matrix.AdjustHue(hue);
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Changes the brightness. Typical values are in the range(-1, 1). Values above zero will make the
 /// image brighter, values below zero will make it darker.
 /// </summary>
 public void AdjustBrightness(float brightness)
 {
     ColorEffect.Matrix.AdjustBrightness(brightness);
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Changes the contrast. Typical values are in the range(-1, 1). Values above zero will raise,
 /// values below zero will reduce the contrast.
 /// </summary>
 public void AdjustContrast(float contrast)
 {
     ColorEffect.Matrix.AdjustContrast(contrast);
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Changes the saturation. Typical values are in the range(-1, 1). Values above zero will raise,
 /// values below zero will reduce the saturation. '-1' will produce a grayscale image.
 /// </summary>
 public void AdjustSaturation(float saturation)
 {
     ColorEffect.Matrix.AdjustSaturation(saturation);
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Inverts the colors of the filtered objects.
 /// </summary>
 public void Invert()
 {
     ColorEffect.Matrix.Invert();
     ColorEffect.UpdateShaderMatrix();
     SetRequiresRedraw();
 }