为什么 SKShapeNode 没有锚点? [英] Why SKShapeNode does not have anchor point?

查看:31
本文介绍了为什么 SKShapeNode 没有锚点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解为什么 SKShapeNode 没有锚点?

i am trying to understand why SKShapeNode does not have an anchor point ?

推荐答案

当您使用图像时,您可能需要将其与节点位置对齐.除了通过anchorPoint之外没有其他方法可以这样做,因为图像本身无法修改(无论如何都不容易).

When you use an image you may need to align it on its node's position. There's no other way to do so but through anchorPoint because the image itself can't be modified (not easily anyway).

创建形状时,您可以通过 CGPath 完全控制形状的对齐方式.您可以简单地转换路径以更改形状相对于节点位置的对齐方式.

When you create a shape you have full control over the alignment of the shape through CGPath. You can simply translate the path to change the shape's alignment relative to the node's position.

这是我的解释,不是事实.

This is my interpretation, not fact.

这篇关于为什么 SKShapeNode 没有锚点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆