Package muntjac :: Package addon :: Package invient :: Module gradient :: Class LinearGradient
[hide private]
[frames] | no frames]

Class LinearGradient

source code

  object --+        
           |        
paint.IPaint --+    
               |    
       IGradient --+
                   |
                  LinearGradient

Represents linear gradient where points of a linear gradient specify a line. For more details on gradient, refer to CSS 3 gradient documentation.


Authors:
Invient, Richard Lincoln
Instance Methods [hide private]
 
__init__(self, xStart, xStartUnit_or_yStart, yStart_or_xEnd, yStartUnit_or_yEnd, xEnd_or_colorStops, xEndUnit=None, yEnd=None, yEndUnit=None, colorStops=None)
Creates a LinearGradient with the specified xStart, xEnd, yStart and yEnd values with default {@link Unit} value number.
source code
 
getxStart(self)
Returns the x-coordinate of a point at which linear gradient starts.
source code
 
getxEnd(self)
Returns the x-coordinate of a point at which linear gradient ends.
source code
 
getyStart(self)
Returns the y-coordinate of a point at which linear gradient starts.
source code
 
getyEnd(self)
Returns the x-coordinate of a point at which linear gradient ends.
source code
 
getxStartUnit(self)
Returns the unit of x-coordinate of a point at which linear gradient starts.
source code
 
getyStartUnit(self)
Returns the unit of y-coordinate of a point at which linear gradient starts.
source code
 
getxEndUnit(self)
Returns the unit of x-coordinate of a point at which linear gradient ends.
source code
 
getyEndUnit(self)
Returns the unit of y-coordinate of a point at which linear gradient ends.
source code
 
getColorStops(self)
Returns a list of colorstops associated with this gradient.
source code
 
getString(self)
Returns: Returns string representation of this LinearGradient
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, xStart, xStartUnit_or_yStart, yStart_or_xEnd, yStartUnit_or_yEnd, xEnd_or_colorStops, xEndUnit=None, yEnd=None, yEndUnit=None, colorStops=None)
(Constructor)

source code 
Creates a LinearGradient with the specified xStart, xEnd, yStart
and yEnd values with default {@link Unit} value number.

@param xStart:
           the x-coordinate of a point at which linear gradient
           starts.
@param xStartUnit_or_yStart:
           the unit for the xStart value. It can have one of the two
           values Unit.NUMBER or Unit.PERCENT. If it is null then the
           default value is Unit.NUMBER. Or the y-coordinate of a point
           at which linear gradient starts.
@param yStart_or_xEnd:
           the y-coordinate of a point at which linear gradient
           starts or the x-coordinate of a point at which linear
           gradient ends.
@param yStartUnit_or_yEnd:
           the unit for the yStart value. It can have one of the two
           values Unit.NUMBER or Unit.PERCENT. If it is null then the
           default value is Unit.NUMBER. Or the y-coordinate of a point
           at which linear gradient ends.
@param xEnd_or_colorStops:
           the x-coordinate of a point at which linear gradient ends or
           the list of colorstops for the linear gradient.
@param xEndUnit:
           the unit for the xEnd value. It can have one of the two
           values Unit.NUMBER or Unit.PERCENT. If it is null then the
           default value is Unit.NUMBER.
@param yEnd:
           the y-coordinate of a point at which linear gradient ends.
@param yEndUnit
           the unit for the yEnd value. It can have one of the two
           values Unit.NUMBER or Unit.PERCENT. If it is null then the
           default value is Unit.NUMBER.
@param colorStops:
           the list of colorstops for the linear gradient.

Overrides: object.__init__

getxStart(self)

source code 
Returns the x-coordinate of a point at which linear gradient
        starts.
@return: the x-coordinate of a point at which linear gradient
        starts.

Overrides: IGradient.getxStart
(inherited documentation)

getxEnd(self)

source code 
Returns the x-coordinate of a point at which linear gradient
        ends.
@return: the x-coordinate of a point at which linear gradient
         ends.

Overrides: IGradient.getxEnd
(inherited documentation)

getyStart(self)

source code 

Returns the y-coordinate of a point at which linear gradient starts.

Returns:
the y-coordinate of a point at which linear gradient starts.
Overrides: IGradient.getyStart
(inherited documentation)

getyEnd(self)

source code 

Returns the x-coordinate of a point at which linear gradient ends.

Returns:
the x-coordinate of a point at which linear gradient ends.
Overrides: IGradient.getyEnd
(inherited documentation)

getxStartUnit(self)

source code 

Returns the unit of x-coordinate of a point at which linear gradient starts.

Returns:
the unit of x-coordinate of a point at which linear gradient starts.
Overrides: IGradient.getxStartUnit
(inherited documentation)

getyStartUnit(self)

source code 

Returns the unit of y-coordinate of a point at which linear gradient starts.

Returns:
the unit of y-coordinate of a point at which linear gradient starts.
Overrides: IGradient.getyStartUnit
(inherited documentation)

getxEndUnit(self)

source code 

Returns the unit of x-coordinate of a point at which linear gradient ends.

Returns:
the unit of x-coordinate of a point at which linear gradient ends.
Overrides: IGradient.getxEndUnit
(inherited documentation)

getyEndUnit(self)

source code 

Returns the unit of y-coordinate of a point at which linear gradient ends.

Returns:
the unit of y-coordinate of a point at which linear gradient ends.
Overrides: IGradient.getyEndUnit
(inherited documentation)

getColorStops(self)

source code 

Returns a list of colorstops associated with this gradient.

Returns:
a list of colorstops associated with this gradient.
Overrides: IGradient.getColorStops
(inherited documentation)

getString(self)

source code 

Returns string representation of an object of type Paint.

Returns:
Returns string representation of this LinearGradient
Overrides: paint.IPaint.getString