コード例 #1
0
// SetColors
void
Gradient::SetColors(const Gradient& other)
{
#ifdef ICON_O_MATIC
	AutoNotificationSuspender _(this);
#endif

	_MakeEmpty();
	for (int32 i = 0; BGradient::ColorStop* step = other.ColorAt(i); i++)
		AddColor(*step, i);

	Notify();
}
コード例 #2
0
// constructor
Gradient::Gradient(const Gradient& other)
#ifdef ICON_O_MATIC
	: BArchivable(other),
	  Observable(),
	  Transformable(other),
#else
	: Transformable(other),
#endif

	  fColors(4),
	  fType(other.fType),
	  fInterpolation(other.fInterpolation),
	  fInheritTransformation(other.fInheritTransformation)
{
	for (int32 i = 0; BGradient::ColorStop* step = other.ColorAt(i); i++) {
		AddColor(*step, i);
	}
}