Basic css linear-gradient support.

--HG--
branch : dev
This commit is contained in:
Martín Lucas Golini
2019-01-11 03:16:56 -03:00
parent 4c93e28929
commit cbe59866a8
9 changed files with 225 additions and 8 deletions

View File

@@ -44,9 +44,9 @@ class EE_API StateListDrawable : public StatefulDrawable {
virtual Uint8 getStateAlpha( const Uint32& state );
bool hasDrawableState( Uint32 state );
bool hasDrawableState(const Uint32 & state ) const;
bool hasDrawableStateColor( Uint32 state );
bool hasDrawableStateColor(const Uint32 & state ) const;
void clearDrawables();
protected:

View File

@@ -37,8 +37,7 @@ class NodeAttribute {
TypeRectf
};
class Info
{
class Info {
public:
Info( AttributeType type, const std::string& name );
@@ -55,6 +54,23 @@ class NodeAttribute {
std::vector<std::string> names;
};
class FunctionType {
public:
static FunctionType parse( const std::string& function );
FunctionType( const std::string& name, const std::vector<std::string>& parameters );
const std::string& getName() const;
const std::vector<std::string> getParameters() const;
bool isEmpty() const;
protected:
std::string name;
std::vector<std::string> parameters;
};
NodeAttribute();
NodeAttribute( std::string name, std::string value );

View File

@@ -235,6 +235,8 @@ class EE_API Color : public tColor<Uint8>
static Color fromString( std::string str );
static bool isColorString( std::string str );
static const Color Transparent;
static const Color White;
static const Color Black;
@@ -276,8 +278,29 @@ public:
Color toColor();
};
class RectColors {
class EE_API RectColors {
public:
RectColors() :
TopLeft( Color::White ),
TopRight( Color::White ),
BottomLeft( Color::White ),
BottomRight( Color::White )
{}
RectColors( const Color& color ) :
TopLeft( color ),
TopRight( color ),
BottomLeft( color ),
BottomRight( color )
{}
RectColors( const Color& topLeft, const Color& topRight, const Color& bottomLeft, const Color& bottomRight ) :
TopLeft( topLeft ),
TopRight( topRight ),
BottomLeft( bottomLeft ),
BottomRight( bottomRight )
{}
Color TopLeft;
Color TopRight;
Color BottomLeft;