class MT_ImageMapsTexture(common.ulb:TrapShape) {
;
; Mark Townsend, June 2008
;
public:
func MT_ImageMapsTexture(Generic pparent)
TrapShape.TrapShape(pparent)
fImage = new @p_image(this)
if !fImage.getEmpty()
fRatio = fImage.getWidth() / fImage.getHeight()
else
fRatio = 1
endif
endfunc
float func Iterate(complex pz)
TrapShape.Iterate(pz)
color clr = fImage.getColor(real(pz)+ flip(imag(pz) * fRatio))
return 1 - (0.3 * red(clr)+ 0.59 * green(clr) + 0.11 * blue(clr))
endfunc
private:
ImageWrapper fImage
float fRatio
default:
title = "Image Maps Texture"
ImageWrapper param p_image
caption = "Image"
default = ImageImport
endparam
}