如何创建从一种形状到另一种形状的变形效果? [英] How do I create a morphing effect from one shape to another?

查看:72
本文介绍了如何创建从一种形状到另一种形状的变形效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

javafx 1.3教程介绍了如何将矩形变形为一个圆圈?.

The javafx 1.3 tutorial describes how to morph a rectangle to a circle ?.

代码清晰而且非常简单.

The code is clear and very ... simple.

javafx 2.2中是否存在等效转换?

Is there an equivalent transformation in javafx 2.2 ?

推荐答案

在等待更好的解决方案,我发现了一种解决方法.

Awaiting a better solution, i have found a work-around.

我的解决方案基于jfxrt.jar(com.sun.javafx.sg.prism.ShapeEvaluator)和方法javafx.scene.shape.Shape#createFromGeomShape中可用的变形算法.由于这些代码部分不可见,因此我将它们复制了.

My solution is based on a morphing algorithm available in the jfxrt.jar (com.sun.javafx.sg.prism.ShapeEvaluator) and on the method javafx.scene.shape.Shape#createFromGeomShape. Since these portions of code are not visible, i copied them.

该代码可在此要点中找到.

这篇关于如何创建从一种形状到另一种形状的变形效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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