示例#1
0
 public static ImageFilter CreateMatrixConvolution(SizeI kernelSize, float[] kernel, float gain, float bias, PointI kernelOffset, ShaderTileMode tileMode, bool convolveAlpha, ImageFilter?input = null, CropRect?cropRect = null)
 {
     return(new MatrixConvolutionImageFilter()
     {
         KernelSize = kernelSize,
         Kernel = kernel,
         Gain = gain,
         Bias = bias,
         KernelOffset = kernelOffset,
         TileMode = tileMode,
         ConvolveAlpha = convolveAlpha,
         Input = input,
         CropRect = cropRect
     });
 }
示例#2
0
 public static string ToSKPointI(this SP.PointI pointI)
 {
     return($"new SKPointI({pointI.X.ToString(_ci)}, {pointI.Y.ToString(_ci)})");
 }
示例#3
0
 public static Shader CreatePerlinNoiseTurbulence(float baseFrequencyX, float baseFrequencyY, int numOctaves, float seed, PointI tileSize)
 {
     return(new PerlinNoiseTurbulenceShader()
     {
         BaseFrequencyX = baseFrequencyX,
         BaseFrequencyY = baseFrequencyY,
         NumOctaves = numOctaves,
         Seed = seed,
         TileSize = tileSize
     });
 }