Add widget state support.
This commit is contained in:
parent
19091a0e80
commit
8536908eab
19 changed files with 385 additions and 46 deletions
|
@ -25,6 +25,11 @@ public:
|
|||
|
||||
std::string toString() const;
|
||||
|
||||
void setAlpha(float alpha)
|
||||
{
|
||||
mAlpha = static_cast<double>(alpha);
|
||||
}
|
||||
|
||||
bool operator==(const Color& rhs) const
|
||||
{
|
||||
return (mR == rhs.mR)
|
||||
|
|
|
@ -50,4 +50,14 @@ namespace ntk {
|
|||
{
|
||||
return mBottomLeft;
|
||||
}
|
||||
|
||||
double Rectangle::getRadius() const
|
||||
{
|
||||
return mRadius;
|
||||
}
|
||||
|
||||
void Rectangle::setRadius(double radius)
|
||||
{
|
||||
mRadius = radius;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,17 @@ public:
|
|||
|
||||
Type getType() const override;
|
||||
|
||||
double getRadius() const;
|
||||
|
||||
void setRadius(double radius);
|
||||
|
||||
void sample(SparseGrid<bool>* grid) const override;
|
||||
|
||||
private:
|
||||
Point mBottomLeft;
|
||||
double mWidth{0};
|
||||
double mHeight{0};
|
||||
double mRadius{ 0.0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue