//
// UIImage+Sprite.h
//
// Created by Rafal Sroka on 11-11-17.
// Copyright (c) 2011 Rafal Sroka. All rights reserved.
//
// This code is distributed under the terms and conditions of the MIT license.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
/**
Useful UIImage category for handling sprite sheets. This add-on smoothes the way of extracting images from a sprite sheet (texture atlas).
Note that for performance reasons you should not fire these methods every time you want to get the array of animation frames.
You should rather fire it once and store the output array somewhere. This is because the Core Graphics image manipulation operations (especially on large images) are not so fast and your application may slow down.
*/
@interface UIImage (Sprite)
/**
The method returns an array with UIImages. Original sprite sheet is sliced into smaller chunks, each of the specified size.
@param image the image with sprite sheet (texture atlas)
@param size the size of the single chunk
@returns the array of UIImages, each representing a single animation frame
*/
-(NSArray *)spritesWithSpriteSheetImage:(UIImage *)image spriteSize:(CGSize)size;
/**
The method returns an array with UIImages. Original sprite sheet is sliced into smaller chunks, each of the specified size.
@param image the image with sprite sheet (texture atlas)
@param range the range of the chunks
@param size the size of the single chunk
@returns the array of UIImages, each representing a single animation frame
*/
-(NSArray *)spritesWithSpriteSheetImage:(UIImage *)image inRange:(NSRange)range spriteSize:(CGSize)size;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
iOS游戏应用源代码——r3econ-UIImage-Sprite-Additions-0738b37.zip
共23个文件
m:5个
h:4个
plist:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 132 浏览量
2023-07-05
23:22:29
上传
评论
收藏 894KB ZIP 举报
温馨提示
iOS游戏应用源代码——r3econ-UIImage-Sprite-Additions-0738b37.zip
资源推荐
资源详情
资源评论
收起资源包目录
iOS游戏应用源代码——r3econ-UIImage-Sprite-Additions-0738b37.zip (23个子文件)
r3econ-UIImage-Sprite-Additions-0738b37
README.mdown 3KB
UIImage+Sprite.h 3KB
UIImage+Sprite.m 3KB
SpriteAnimationDemo
SpriteAnimationDemo.xcodeproj
project.pbxproj 13KB
xcuserdata
rafalsroka.xcuserdatad
xcdebugger
Breakpoints.xcbkptlist 91B
xcschemes
xcschememanagement.plist 491B
SpriteAnimationDemo.xcscheme 3KB
project.xcworkspace
contents.xcworkspacedata 164B
xcuserdata
rafalsroka.xcuserdatad
UserInterfaceState.xcuserstate 23KB
WorkspaceSettings.xcsettings 383B
SpriteAnimationDemo
AppDelegate.h 366B
AppDelegate.m 3KB
main.m 355B
UIImage+Sprite
UIImage+Sprite.h 3KB
UIImage+Sprite.m 3KB
SpriteAnimationDemo-Prefix.pch 341B
MasterViewController.m 3KB
SpriteAnimationDemo-Info.plist 1KB
explosion_4_39_128_debug.png 439KB
explosion_4_39_128.png 427KB
MasterViewController.h 598B
en.lproj
InfoPlist.strings 45B
MasterViewController.xib 24KB
共 23 条
- 1
资源评论
快乐无限出发
- 粉丝: 1127
- 资源: 7260
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- STM8L101F3P6单片机+CC1100模块433M遥控器设计硬件(原理图+PCB)工程文件.zip
- 上传下载铁人下载系统 Liuxing 1.0-liuxing1.0.rar
- 南京邮电大学数学实验实力雄厚,凭借其优秀的师资力量、丰富的实践教学资源和卓越的科研成果,成为国内一流的数学实验教学和科研基地
- 【火爆朋友圈的今天吃什么源码 v1.0】随机的为用户带来每一天的用餐选择和推荐.rar
- MPU6050中文版数据手册
- 上传下载手机电影下载-mobiledy.rar
- 响应式旅游网站源码下载 马尔代夫旅游网站.rar
- CMS小涴熊漫画连载系统漫画网站源码 带采集API.rar
- 福袋点点.apk
- 基于STM32的电子秤采用0.96寸OLED显示UI界面源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功