CocosSharp.CCLayerGradient Class
is a subclass of that draws gradients across the background.

See Also: CCLayerGradient Members


public class CCLayerGradient : CCLayerColor


All features from CocosSharp.CCLayerColor are valid, plus the following new features:


Color is interpolated between the startColor and endColor along the given vector (starting at the origin, ending at the terminus). If no vector is supplied, it defaults to (0, -1) a fade from top to bottom.

If 'compressedInterpolation' is disabled, you will not see either the start or end color for non-cardinal vectors; a smooth gradient implying both end points will be still be drawn, however.

If ' compressedInterpolation' is enabled (default mode) you will see both the start and end colors of the gradient.



direction direction final color final color interpolation mode interpolation mode


Namespace: CocosSharp
Assembly: CocosSharp (in CocosSharp.dll)