Skip to content

Transformations Guide

Daniel Luberda edited this page Dec 29, 2015 · 8 revisions

Transformations

BlurredTransformation

public BlurredTransformation(double radius)

CircleTransformation

public CircleTransformation()

public CircleTransformation(double borderSize, string borderHexColor)

ColorSpaceTransformation

public ColorSpaceTransformation(float[][] rgbawMatrix)

Included sample matrices:

  • FFColorMatrix.GrayscaleColorMatrix
  • FFColorMatrix.InvertColorMatrix
  • FFColorMatrix.SepiaColorMatrix
  • FFColorMatrix.BlackAndWhiteColorMatrix
  • FFColorMatrix.PolaroidColorMatrix
  • FFColorMatrix.WhiteToAlphaColorMatrix

CornersTransformation

public CornersTransformation(double cornersSize, CornerTransformType cornersTransformType)

public CornersTransformation(double topLeftCornerSize, double topRightCornerSize, double bottomLeftCornerSize, double bottomRightCornerSize, 
	CornerTransformType cornersTransformType)
	
public CornersTransformation(double cornersSize, CornerTransformType cornersTransformType, double cropWidthRatio, double cropHeightRatio)

public CornersTransformation(double topLeftCornerSize, double topRightCornerSize, double bottomLeftCornerSize, double bottomRightCornerSize, 
	CornerTransformType cornersTransformType, double cropWidthRatio, double cropHeightRatio)
	
[Flags]
public enum CornerTransformType
{
	TopLeftCut = 0x1,
	TopRightCut = 0x2,
	BottomLeftCut = 0x4,
	BottomRightCut = 0x8,

	TopLeftRounded = 0x10,
	TopRightRounded = 0x20,
	BottomLeftRounded = 0x40,
	BottomRightRounded = 0x80,

	AllCut = TopLeftCut | TopRightCut | BottomLeftCut | BottomRightCut,
	LeftCut = TopLeftCut | BottomLeftCut,
	RightCut = TopRightCut | BottomRightCut,
	TopCut = TopLeftCut | TopRightCut,
	BottomCut = BottomLeftCut | BottomRightCut,

	AllRounded = TopLeftRounded | TopRightRounded | BottomLeftRounded | BottomRightRounded,
	LeftRounded = TopLeftRounded | BottomLeftRounded,
	RightRounded = TopRightRounded | BottomRightRounded,
	TopRounded = TopLeftRounded | TopRightRounded,
	BottomRounded = BottomLeftRounded | BottomRightRounded,
}

CropTransformation

public CropTransformation(double zoomFactor, double xOffset, double yOffset)

public CropTransformation(double zoomFactor, double xOffset, double yOffset, double cropWidthRatio, double cropHeightRatio)

FlipTransformation

public FlipTransformation(FlipType flipType)

public enum FlipType
{
	Horizontal,
	Vertical
}

GrayscaleTransformation

public GrayscaleTransformation()

RotateTransformation

public RotateTransformation(double degrees) : this(degrees, false, false)

public RotateTransformation(double degrees, bool ccw) : this(degrees, ccw, false)

public RotateTransformation(double degrees, bool ccw, bool resize)

RoundedTransformation

public RoundedTransformation(double radius

public RoundedTransformation(double radius, double cropWidthRatio, double cropHeightRatio)

public RoundedTransformation(double radius, double cropWidthRatio, double cropHeightRatio, double borderSize, string borderHexColor)

SepiaTransformation

public SepiaTransformation()