tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / kits / interface / GradientConic.cpp
blob8a662cbbfd2c103a60ad3db430a6910d17796674
1 /*
2 * Copyright 2006-2008, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Artur Wyszynski <harakash@gmail.com>
7 */
9 #include <Point.h>
10 #include <Gradient.h>
11 #include <GradientConic.h>
14 // constructor
15 BGradientConic::BGradientConic()
17 fData.conic.cx = 0.0f;
18 fData.conic.cy = 0.0f;
19 fData.conic.angle = 0.0f;
20 fType = TYPE_CONIC;
24 // constructor
25 BGradientConic::BGradientConic(const BPoint& center, float angle)
27 fData.conic.cx = center.x;
28 fData.conic.cy = center.y;
29 fData.conic.angle = angle;
30 fType = TYPE_CONIC;
34 // constructor
35 BGradientConic::BGradientConic(float cx, float cy, float angle)
37 fData.conic.cx = cx;
38 fData.conic.cy = cy;
39 fData.conic.angle = angle;
40 fType = TYPE_CONIC;
44 // Center
45 BPoint
46 BGradientConic::Center() const
48 return BPoint(fData.conic.cx, fData.conic.cy);
52 // SetCenter
53 void
54 BGradientConic::SetCenter(const BPoint& center)
56 fData.conic.cx = center.x;
57 fData.conic.cy = center.y;
61 // SetCenter
62 void
63 BGradientConic::SetCenter(float cx, float cy)
65 fData.conic.cx = cx;
66 fData.conic.cy = cy;
70 // Angle
71 float
72 BGradientConic::Angle() const
74 return fData.conic.angle;
78 // SetAngle
79 void
80 BGradientConic::SetAngle(float angle)
82 fData.conic.angle = angle;