Class CCLayerGradient

#include <Geode/cocos/layers_scenes_transitions_nodes/CCLayer.h>
classCCLayerGradient:publiccocos2d::CCLayerColor{ ... }

Since v0.99.5

CCLayerGradient is a subclass of CCLayerColor that draws gradients across the background. All features from CCLayerColor are valid, plus the following new features:

  • direction
  • final color
  • interpolation mode 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.
Examples0
Public static methods3
staticcocos2d::CCLayerGradient*create(,)

Creates a full-screen CCLayer with a gradient between start and end.

staticcocos2d::CCLayerGradient*create(,,)

Creates a full-screen CCLayer with a gradient between start and end in the direction of v.

staticcocos2d::CCLayerGradient*create()
No description provided
Public member functions19
virtualboolinit()
No description provided
virtualvoidupdateColor()
No description provided
virtualboolinitWithColor(,)

Initializes the CCLayer with a gradient between start and end.

virtualboolinitWithColor(,,)

Initializes the CCLayer with a gradient between start and end in the direction of v.

virtualcocos2d::ccColor3Bconst&getStartColor()
No description provided
virtualvoidsetStartColor()
No description provided
virtualcocos2d::ccColor3Bconst&getEndColor()
No description provided
virtualvoidsetEndColor()
No description provided
virtual_::GLubytegetStartOpacity()
No description provided
virtualvoidsetStartOpacity()
No description provided
virtual_::GLubytegetEndOpacity()
No description provided
virtualvoidsetEndOpacity()
No description provided
virtualcocos2d::CCPointconst&getVector()
No description provided
virtualvoidsetVector()
No description provided
boolgetShouldPremultiply()const
No description provided
voidsetShouldPremultiply()
No description provided
voidsetValues(,,,,)
No description provided
virtualvoidsetCompressedInterpolation(
boolbCompressedInterpolation
)
No description provided
virtualboolisCompressedInterpolation()
No description provided
Fields0
Protected member functions0
Protected fields6
cocos2d::ccColor3Bm_startColor
;
No description provided
;
No description provided
_::GLubytem_cStartOpacity
;
No description provided
_::GLubytem_cEndOpacity
;
No description provided
cocos2d::CCPointm_AlongVector
;
No description provided
boolm_bCompressedInterpolation
;

Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors Default: YES