mirror of https://github.com/axmolengine/axmol.git
fix merge issue
This commit is contained in:
parent
f32b59d565
commit
86c3e60254
|
@ -50,7 +50,7 @@ namespace ui {
|
|||
* Then you could call any methods of Sprite class with the return pointers.
|
||||
*
|
||||
*/
|
||||
class CC_GUI_DLL Scale9Sprite : public Node
|
||||
class CC_GUI_DLL Scale9Sprite : public Node , public cocos2d::BlendProtocol
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -366,6 +366,25 @@ namespace ui {
|
|||
*/
|
||||
CC_DEPRECATED(v3) virtual bool initWithBatchNode(SpriteBatchNode* batchnode, const Rect& rect, const Rect& capInsets);
|
||||
|
||||
/**
|
||||
* Sets the source blending function.
|
||||
*
|
||||
* @param blendFunc A structure with source and destination factor to specify pixel arithmetic,
|
||||
* e.g. {GL_ONE, GL_ONE}, {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual void setBlendFunc(const BlendFunc &blendFunc) override;
|
||||
|
||||
/**
|
||||
* Returns the blending function that is currently being used.
|
||||
*
|
||||
* @return A BlendFunc structure with source and destination factor which specified pixel arithmetic.
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual const BlendFunc &getBlendFunc() const override;
|
||||
|
||||
/**
|
||||
* Creates and returns a new sprite object with the specified cap insets.
|
||||
* You use this method to add cap insets to a sprite or to change the existing
|
||||
|
@ -645,12 +664,15 @@ namespace ui {
|
|||
virtual float getScaleY() const override;
|
||||
virtual float getScale() const override;
|
||||
using Node::getScaleZ;
|
||||
virtual void setCameraMask(unsigned short mask, bool applyChildren = true) override;
|
||||
protected:
|
||||
void updateCapInset();
|
||||
void updatePositions();
|
||||
void createSlicedSprites();
|
||||
void cleanupSlicedSprites();
|
||||
void adjustScale9ImagePosition();
|
||||
void applyBlendFunc();
|
||||
void updateBlendFunc(Texture2D *texture);
|
||||
/**
|
||||
* Sorts the children array once before drawing, instead of every time when a child is added or reordered.
|
||||
* This approach can improves the performance massively.
|
||||
|
@ -676,6 +698,7 @@ namespace ui {
|
|||
Sprite* _bottomRightSprite;
|
||||
|
||||
bool _scale9Enabled;
|
||||
BlendFunc _blendFunc;
|
||||
|
||||
Size _topLeftSize;
|
||||
Size _centerSize;
|
||||
|
|
Loading…
Reference in New Issue