Add gegl:mirrors.

This commit is contained in:
Bauke 2022-03-07 22:04:23 +01:00
parent 9a3df37966
commit 5c31352e4e
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 43 additions and 0 deletions

View File

@ -1,5 +1,6 @@
export * from './base.js';
export * from './crop.js';
export * from './generic.js';
export * from './mirrors.js';
export * from './newsprint.js';
export * from './simplex-noise.js';

42
source/gegl/mirrors.ts Normal file
View File

@ -0,0 +1,42 @@
import {BaseOperation} from './base.js';
export interface MirrorsParameters {
clip: boolean;
cX: number;
cY: number;
inputScale: number;
mAngle: number;
nSegs: number;
outputScale: number;
oX: number;
oY: number;
rAngle: number;
trimX: number;
trimY: number;
warp: boolean;
}
export class Mirrors extends BaseOperation<MirrorsParameters> {
public static default: MirrorsParameters = {
clip: true,
cX: 0.5,
cY: 0.5,
inputScale: 100,
mAngle: 0,
nSegs: 6,
outputScale: 1,
oX: 0,
oY: 0,
rAngle: 0,
trimX: 0,
trimY: 0,
warp: true,
};
public appendCrop = false;
public name = 'gegl:mirrors';
constructor(parameters?: Partial<MirrorsParameters>) {
super({...Mirrors.default, ...parameters});
}
}