tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / kits / interface / GradientRadial.cpp
blob6c58fc978723f6c81705a4aad3dbc1b0baa24529
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 <GradientRadial.h>
14 // constructor
15 BGradientRadial::BGradientRadial()
17 fData.radial.cx = 0.0f;
18 fData.radial.cy = 0.0f;
19 fData.radial.radius = 0.0f;
20 fType = TYPE_RADIAL;
24 // constructor
25 BGradientRadial::BGradientRadial(const BPoint& center, float radius)
27 fData.radial.cx = center.x;
28 fData.radial.cy = center.y;
29 fData.radial.radius = radius;
30 fType = TYPE_RADIAL;
34 // constructor
35 BGradientRadial::BGradientRadial(float cx, float cy, float radius)
37 fData.radial.cx = cx;
38 fData.radial.cy = cy;
39 fData.radial.radius = radius;
40 fType = TYPE_RADIAL;
44 // Center
45 BPoint
46 BGradientRadial::Center() const
48 return BPoint(fData.radial.cx, fData.radial.cy);
52 // SetCenter
53 void
54 BGradientRadial::SetCenter(const BPoint& center)
56 fData.radial.cx = center.x;
57 fData.radial.cy = center.y;
61 // SetCenter
62 void
63 BGradientRadial::SetCenter(float cx, float cy)
65 fData.radial.cx = cx;
66 fData.radial.cy = cy;
70 // Radius
71 float
72 BGradientRadial::Radius() const
74 return fData.radial.radius;
78 // SetRadius
79 void
80 BGradientRadial::SetRadius(float radius)
82 fData.radial.radius = radius;