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

Method parseNinePatchImage

core/renderer/TextureCache.cpp:508–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void TextureCache::parseNinePatchImage(ax::Image* image, ax::Texture2D* texture, std::string_view path)
509{
510 if (NinePatchImageParser::isNinePatchImage(path))
511 {
512 Rect frameRect = Rect(0, 0, image->getWidth(), image->getHeight());
513 NinePatchImageParser parser(image, frameRect, false);
514 texture->addSpriteFrameCapInset(nullptr, parser.parseCapInset());
515 }
516}
517
518Texture2D* TextureCache::addImage(Image* image, std::string_view key)
519{

Callers 2

addImageAsyncCallBackMethod · 0.95
addImageMethod · 0.95

Calls 5

parseCapInsetMethod · 0.80
RectFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected