tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / kits / interface / GradientDiamond.cpp
blobcf3bd818a0e48e1e0c58188094f50262f0305aaf
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 <GradientDiamond.h>
14 // constructor
15 BGradientDiamond::BGradientDiamond()
17 fData.diamond.cx = 0.0f;
18 fData.diamond.cy = 0.0f;
19 fType = TYPE_DIAMOND;
23 // constructor
24 BGradientDiamond::BGradientDiamond(const BPoint& center)
26 fData.diamond.cx = center.x;
27 fData.diamond.cy = center.y;
28 fType = TYPE_DIAMOND;
32 // constructor
33 BGradientDiamond::BGradientDiamond(float cx, float cy)
35 fData.diamond.cx = cx;
36 fData.diamond.cy = cy;
37 fType = TYPE_DIAMOND;
41 // Center
42 BPoint
43 BGradientDiamond::Center() const
45 return BPoint(fData.diamond.cx, fData.diamond.cy);
49 // SetCenter
50 void
51 BGradientDiamond::SetCenter(const BPoint& center)
53 fData.diamond.cx = center.x;
54 fData.diamond.cy = center.y;
58 // SetCenter
59 void
60 BGradientDiamond::SetCenter(float cx, float cy)
62 fData.diamond.cx = cx;
63 fData.diamond.cy = cy;