CoreImage.CICheckerboardGenerator Class
The CICheckerboardGenerator CoreImage filter

See Also: CICheckerboardGenerator Members

Syntax

[ObjCRuntime.iOS(5, 0)]
public class CICheckerboardGenerator : CIFilter

Remarks

The following example shows this filter in use

C# Example

// Create the Two Colors for the Checkerboard
var c0 = CIColor.FromRgb (1, 0, 0);
var c1 = CIColor.FromRgb (0, 1, 0);
var checker = new CICheckerboardGenerator ()
{
	Color0 = c0,
	Color1 = c1,
	Center = new CIVector (new float[] { 10 , 10 }), // Default [80 80]
	Sharpness = 1F // Default 1
};

// The Generator Filters need to be cropped before they can be displayed
var crop = new CICrop() 
{
	Image = checker.OutputImage,
	// Create the Bounds based on the Size of the application Window. (UIWindow)
	Rectangle = new CIVector(0, 0, window.Bounds.Width, window.Bounds.Height) 
};

// Get the final Generated Image
var output = crop.OutputImage;

// To render the results, we need to create a context, and then
// use one of the context rendering APIs, in this case, we render the
// result into a CoreGraphics image, which is merely a useful representation
//
var context = CIContext.FromOptions (null);

var cgimage = context.CreateCGImage (output, output.Extent);

// The above cgimage can be added to a screen view, for example, this
// would add it to a UIImageView on the screen:
myImageView.Image = UIImage.FromImage (cgimage);
			

Related content

Requirements

Namespace: CoreImage
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0