12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef MANDEL_MANDELUTIL_H
- #define MANDEL_MANDELUTIL_H
- namespace mnd
- {
- struct MandelViewport;
- struct MandelInfo;
- }
- struct mnd::MandelViewport
- {
- /// real part of the top left corner
- double x = -2.1;
- /// imaginary part of the top left corner
- double y = -1.5;
- /// real-part span of the picture to be generated
- double width = 3;
- /// imaginary-part span of the picture to be generated
- double height = 3;
- /*!
- * \brief adjusts the aspect ratio of the viewport, making sure
- * the updated viewport contains all of the original one.
- */
- void adjustAspectRatio(double nwidth, double nheight);
- /*!
- * \brief make sure width and height are positive
- */
- void normalize(void);
- };
- struct mnd::MandelInfo
- {
- /// viewport
- MandelViewport view;
- /// width of the bitmap to be generated
- long bWidth;
- /// height of the bitmap to be generated
- long bHeight;
-
- /// maximum iterations
- int maxIter;
- };
- #endif // MANDEL_MANDELUTIL_H
|