Table of Contents

Class Texture2DCreator

Namespace
PAC.ImageEditing

Provides methods to create Texture2Ds.

public static class Texture2DCreator
Inheritance
Texture2DCreator
Inherited Members

Methods

HSLHueSaturationGrid(int, int)

Creates a Texture2D of size width x height, where the colour of a pixel is determined in HSL as follows:

  • Hue: linearly interpolated based on the x coord, such that the left-most pixels have hue 0 and the texture goes through all hues exactly once.
  • Saturation: linearly interpolated based on the y coord, such that the top-most pixels have saturation 1 and the bottom-most pixels have saturation 0.
  • Lightness: 0.5.
public static Texture2D HSLHueSaturationGrid(int width, int height)

Parameters

width int
height int

Returns

Texture2D

Remarks

Calls Texture2D.Apply() on the returned Texture2D.

TransparentCheckerboardBackground(int, int)

Creates a checkerboard Texture2D to act as the background for transparent pixels for a width x height image.

public static Texture2D TransparentCheckerboardBackground(int width, int height)

Parameters

width int
height int

Returns

Texture2D

Remarks

The checkerboard texture will have dimensions 2 * width x 2 * height.

Calls Texture2D.Apply() on the returned Texture2D.