MCPcopy Create free account
hub / github.com/axmolengine/axmol / addSpriteFrameCapInset

Method addSpriteFrameCapInset

core/renderer/Texture2D.cpp:677–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677void Texture2D::addSpriteFrameCapInset(SpriteFrame* spritframe, const Rect& capInsets)
678{
679 if (nullptr == _ninePatchInfo)
680 {
681 _ninePatchInfo = new NinePatchInfo;
682 }
683 if (nullptr == spritframe)
684 {
685 _ninePatchInfo->capInsetSize = capInsets;
686 }
687 else
688 {
689 _ninePatchInfo->capInsetMap[spritframe] = capInsets;
690 }
691}
692
693bool Texture2D::isContain9PatchInfo() const
694{

Callers 2

parseNinePatchImageMethod · 0.45

Calls

no outgoing calls

Tested by 1