123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef MANDEL_MANDELUTIL_H
- #define MANDEL_MANDELUTIL_H
- #include "Real.h"
- namespace mnd
- {
- struct MandelViewport;
- struct MandelInfo;
- }
- struct mnd::MandelViewport
- {
-
- Real x = -2.1;
-
- Real y = -1.5;
-
- Real width = 3;
-
- Real height = 3;
-
- void adjustAspectRatio(double nwidth, double nheight);
-
- void normalize(void);
-
- void zoomCenter(float scale);
- void zoomCenter(const Real& scale);
-
- void zoom(float scale, float x, float y);
- void zoom(const Real& scale, const Real& x, const Real& y);
-
- static MandelViewport standardView(void);
-
- static MandelViewport centerView(void);
- inline Real right() const { return x + width; }
- inline Real bottom() const { return y + height; }
- };
- struct mnd::MandelInfo
- {
-
- MandelViewport view;
-
- long bWidth;
-
- long bHeight;
-
- long maxIter;
-
- bool smooth;
- bool julia = false;
- Real juliaX;
- Real juliaY;
- };
- #endif
|