|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:ImageWrapper
class
ImageWrapper base class.
This class provides access to UF's native Image object
in an extensible class. If you use an Image object
directly, you allow no opportunity for other Image-like
classes to be used with your code. If instead you use
an ImageWrapper object, you will get the Image features
in the default case and still allow Image-like classes
to be used with your code.
class ImageWrapper(Generic) { ; ImageWrapper base class. ; <p> ; This class provides access to UF's native Image object ; in an extensible class. If you use an Image object ; directly, you allow no opportunity for other Image-like ; classes to be used with your code. If instead you use ; an ImageWrapper object, you will get the Image features ; in the default case and still allow Image-like classes ; to be used with your code. public: ; constructor func ImageWrapper(Generic pparent) Generic.Generic(pparent) endfunc ; member functions ; these are pass-throughs to the Image class color func getColor(complex pz) return rgba(0,0,0,0) endfunc color func getPixel(int px, int py) return rgba(0,0,0,0) endfunc bool func getEmpty() return true endfunc int func getWidth() return 0 endfunc int func getHeight() return 0 endfunc ; this is not a pass-through; it aspect-corrects a pixel to the ; correct range. UF's default Image object maps the entire image ; into the (-1,-1) .. (1,1) range regardless of size; this will ; shrink the real or imaginary component of pz as appropriate to ; restore the original image proportions. ; Note: UF's default Image coloring algorithm does this as well. complex func NormalizePixel(complex pz) if (this.getEmpty()) return pz elseif (this.getWidth() > this.getHeight()) return real(pz) + flip(imag(pz) * this.getWidth() / this.getHeight()) else return real(pz) * this.getHeight() / this.getWidth() + flip(imag(pz)) endif endfunc protected: default: int param v_imagewrapper caption = "Version (ImageWrapper)" default = 100 hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used." visible = @v_imagewrapper < 100 endparam }
Constructor Summary | |
---|---|
ImageWrapper()
|
|
ImageWrapper(Generic pparent)
constructor |
Method Summary | |
---|---|
color |
getColor(complex pz)
member functions these are pass-throughs to the Image class |
boolean |
getEmpty()
|
int |
getHeight()
|
color |
getPixel(int px,
int py)
|
int |
getWidth()
|
complex |
NormalizePixel(complex pz)
this is not a pass-through; it aspect-corrects a pixel to the correct range. |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public ImageWrapper(Generic pparent)
public ImageWrapper()
Method Detail |
---|
public color getColor(complex pz)
public color getPixel(int px, int py)
public boolean getEmpty()
public int getWidth()
public int getHeight()
public complex NormalizePixel(complex pz)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |