import { PrintObject } from "../models/PrintObject";
import { Number } from "./Number";
import { String } from "./String";
/**
* @class gve.PixelType
* @since gve
*/
export class PixelType extends PrintObject {
/**
* 返回给定精度的PixelType,每个元素具有给定的限制,以及可选的维度
* @hideconstructor
* @param {String} precision 像素的精度,从int|float|double中选择
* @param {Number} [minValue] 该像素类型的最小值
* @param {Number} [maxValue] 该像素类型的最大值
* @param {Number} [dimensions] 该像素类型可以变化的维度
* @returns PixelType
*/
constructor(precision:'int'|'float'|'double', minValue?:number, maxValue?:number, dimensions?:number) {
super();
}
/**
* 返回此类型的维度
* @returns Number
*/
dimensions(){
return new Number();
}
/**
* 返回64位浮点像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static double(){
return new PixelType('double');
}
/**
* 返回32位浮点像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static float(){
return new PixelType('float');
}
/**
* 返回16位有符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static int16(){
return new PixelType('int');
}
/**
* 返回32位有符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static int32(){
return new PixelType('int');
}
/**
* 返回64位有符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static int64(){
return new PixelType('int');
}
/**
* 返回8位有符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static int8(){
return new PixelType('int');
}
/**
* 返回16位无符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static uint16(){
return new PixelType('int');
}
/**
* 返回32位无符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static uint32(){
return new PixelType('int');
}
/**
* 返回64位无符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static uint64(){
return new PixelType('int');
}
/**
* 返回8位无符号整数像素类型
* @returns PixelType
* @tutorial gve.PixelType
*/
static uint8(){
return new PixelType('int');
}
/**
* 返回PixelType的最大值
* @returns PixelType
*/
maxValue(){
return new PixelType('int');
}
/**
* 返回PixelType的最小值
* @returns PixelType
*/
minValue(){
return new PixelType('int');
}
/**
* 返回PixelType的精度值,从int|float|double中选择
* @returns String
*/
precision(){
return new String();
}
}