方法/库调整大小拖动 [英] Approaches / libraries for resize dragging

查看:134
本文介绍了方法/库调整大小拖动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前工作的一个WYSISYG编辑器,允许用户在移动,缩放,并通过直接操作它们旋转的形状。调整大小似乎是相当复杂的,当形状被旋转。我得到这个工作不旋转的形状,但它会采取一些三角函数计算,以调整被旋转的形状。注册点始终是矩形的中间,因为这使得旋转容易得多。

I'm currently working on a WYSISYG editor that allows the user to move, resize and rotate shapes by directly manipulating them. The resizing seems to be fairly complex when the shape is rotated. I got this working for non-rotated shapes, but it will take some trigonometric calculations to resize shapes that are rotated. The registration point is always is the middle of the rectangle because this makes rotating a lot easier.

在我开始实现这一点,我想知道是否有人知道的任何图书馆或样本源$ C ​​$ c表示这样做,或者可以共享一些提示和技巧来计算转换。

Before I start implementing this, I was wondering if anyone knew of any libraries or sample source code that does this, or could share some tips and tricks to calculate the transformations.

我有以下参数:

  • 旋转(度)
  • 在宽度,高度
  • 在X,Y
  • mouseX,mouseY的

我重视的是什么,我试图完成的截图和另外一个具有绘制到它的一些线路,应该让我来扣除三角计算。十字架是光标。

I attached a screenshot of what I'm trying to accomplish and another one that has some lines drawn onto it that should allow me to deduct the trigonometric calculations. The cross is the cursor.

推荐答案

我建议变换经理 - 的http:// www.greensock.com/transformmanageras3/

I recommend Transform Manager - http://www.greensock.com/transformmanageras3/

这篇关于方法/库调整大小拖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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