| 506 | } |
| 507 | |
| 508 | void 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 | |
| 518 | Texture2D* TextureCache::addImage(Image* image, std::string_view key) |
| 519 | { |
no test coverage detected