将图像在水平方向和水平方向上对称放置垂直的

发布于 2024-12-10 05:48:41 字数 238 浏览 0 评论 0原文

我有几个尺寸相同的图像,我从 xml 读取它们的文件路径。 我想以编程方式将这些图像放置在 iPhone 屏幕上。到这里一切都很好。我只使用cocos2d。

你知道有什么 API 可以帮助我吗? 我将提供这些信息 - 与相邻图像的垂直和水平距离 - 可用的可绘制区域 - 可绘制区域在哪里开始和结束

我当然可以通过代码来完成,但在我看来,这对于大多数开发人员来说似乎是非常常见的问题,尽管可能有人已经实现了,

谢谢

I have several of images with equal in their dimensions which I read their file paths from an xml.
And I would like to place these images on iPhone screen programmatically. Up to here everything is fine. I'm using cocos2d solely.

Do you know any API that would help me ?
I'll supply these information
- distance both in vertical and horizontal to the neighboring images
- available drawable area
- where does the drawable area start and end

I can of course do it by code but this seemed to me very common problem for most of developers and though may be someone already implemented

thx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文