3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / screen_savers / butterfly / Butterfly.h
blob060044b832f1bf4b01d22eaebf4b1aa85dd9a562
1 /*
2 * Copyright 2010-2011, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Geoffry Song, goffrie@gmail.com
7 */
8 #ifndef _BUTTERFLY_H_
9 #define _BUTTERFLY_H_
12 #include <ScreenSaver.h>
15 class Butterfly : public BScreenSaver {
16 public:
17 Butterfly(BMessage* archive, image_id imageID);
19 virtual void StartConfig(BView* view);
20 virtual status_t StartSaver(BView* view, bool preview);
21 virtual void Draw(BView* view, int32 frame);
23 private:
24 inline rgb_color _HueToColor(float hue);
25 inline BPoint _Iterate();
27 private:
28 // base value for calculating the curves on each iteration
29 float fBase;
30 // previously calculated points
31 BPoint fLast[3];
32 // transformation from graph coordinates to view coordinates
33 float fScale;
34 BPoint fTrans;
35 // bounding box of drawn figure
36 BRect fBounds;
40 #endif // _BUTTERFLY_H_