2 * Copyright 2006-2008, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Artur Wyszynski <harakash@gmail.com>
11 #include <GradientRadial.h>
15 BGradientRadial::BGradientRadial()
17 fData
.radial
.cx
= 0.0f
;
18 fData
.radial
.cy
= 0.0f
;
19 fData
.radial
.radius
= 0.0f
;
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
;
35 BGradientRadial::BGradientRadial(float cx
, float cy
, float radius
)
39 fData
.radial
.radius
= radius
;
46 BGradientRadial::Center() const
48 return BPoint(fData
.radial
.cx
, fData
.radial
.cy
);
54 BGradientRadial::SetCenter(const BPoint
& center
)
56 fData
.radial
.cx
= center
.x
;
57 fData
.radial
.cy
= center
.y
;
63 BGradientRadial::SetCenter(float cx
, float cy
)
72 BGradientRadial::Radius() const
74 return fData
.radial
.radius
;
80 BGradientRadial::SetRadius(float radius
)
82 fData
.radial
.radius
= radius
;