ScaleToStr(Scale2d sc, DistanceUnitFormat unitType, int prec) { string x = Converter.DistanceToString(sc.X, unitType, prec); string y = Converter.DistanceToString(sc.Y, unitType, prec); return(string.Format("({0}, {1})", x, y)); }
public IModule3D CreateModule() { switch (modifyType) { case ModifyType.Abs: return(new Abs()); case ModifyType.Clamp: { Clamp clamp = new Clamp(); clamp.LowerBound = lower; clamp.UpperBound = upper; return(clamp); } case ModifyType.Exponent: { Exponent exponent = new Exponent(); exponent.ExponentValue = this.exponent; return(exponent); } case ModifyType.Invert: return(new Invert()); case ModifyType.Curve: return(new Curve()); case ModifyType.Terrace: return(new Terrace()); case ModifyType.ScaleBias: { ScaleBias scaleBias = new ScaleBias(); scaleBias.Scale = scale; scaleBias.Bias = bias; return(scaleBias); } case ModifyType.Scale2d: { Scale2d scale2d = new Scale2d(); scale2d.Scale = this.scale2d; return(scale2d); } default: return(null); } }
ScaleToStr(Scale2d sc) { return(ScaleToStr(sc, DistanceUnitFormat.Current, -1)); }