gpt4 book ai didi

smalltalk - 如何以编程方式在smalltalk80(squeak)中创建箭头变形?

转载 作者:行者123 更新时间:2023-12-02 04:02:00 27 4
gpt4 key购买 nike

我需要从一个给定变形的中心到另一个给定变形的中心绘制一个箭头变形。

如有任何帮助,我们将不胜感激。

最佳答案

假设 ab 是您的变形:

arrow := (LineMorph from: a center to: b center color: Color red width: 2) makeForwardArrow.
arrow openInWorld.

如果您想在变形移动后更新位置,请执行以下操作:

arrow setVertices: {a center. b center}

关于smalltalk - 如何以编程方式在smalltalk80(squeak)中创建箭头变形?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41432977/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com