图形 - 矩形,创建锚属性 [英] Graphics - rectangle, create an anchor property

查看:72
本文介绍了图形 - 矩形,创建锚属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在练习图形 - 绘制椭圆,多边形,矩形等。

各种形状没有锚属性,所以有一种方法我可以创建一个锚属性,或者有一个我可以使用的解决方法,所以当我调整窗体大小时形状调整大小?

任何指针/帮助感激地收到。

我正在使用vb.net 2010



祝你有美好的一天!!

TheBluesEnd

Hi Everyone,
I'm practising with graphics - drawing ovals, polygons, rectangles etc.
The various shapes don't have an anchor property, so is there a way I can create an anchor property, or is there a work-around I could use so the shape resizes as I resize the form??
Any pointers/help gratefully received.
I'm using vb.net 2010

Have a great day!!
TheBluesEnd

推荐答案

这不是属性。拥有这样的财产是没有任何意义的。这是另一个图形对象,可用于操作矢量图形编辑器的对象。我的意思是,您使用的图形基元与您想要实现的任何交互行为几乎没有关系;你需要创建自己的矢量图形编辑器。



你的意思是锚通常是编辑对象周围的轮廓矩形的组合,有些是较小的,用于拖动鼠标的关键点中填充的矩形。在一些编辑器中,还有其他元素用于编辑更复杂的形状(例如,圆形区域);还有各种各样的箭头。



我不想进一步详细说明,因为1)你没有标记你的应用程序类型和UI库使用,2)你似乎不太可能去那么远。如果您对进一步的想法感兴趣,请提供一些后续问题。



-SA
This is not a property. And having such property would not make any sense. This is another graphic object which you can use to manipulate the object of your vector graphics editor. I mean, the graphics primitive you are using have little to do with any interactive behavior you would like to implement; you would need to create your own vector graphics editor.

The "anchor" you mean is usually a combination of a outlined rectangle around your edited object, with some smaller, filled rectangles in the key points used for dragging by a mouse. In some editors, there are other elements use for editing more complex shapes (say, a round area); there are also all kind of arrows.

I don't want to get into further detail, because 1) you did not tag your application type and UI library you are using, 2) it seems unlikely that you are ready to go that far. If you are interested in further ideas, please as some follow-up questions.

—SA


这篇关于图形 - 矩形,创建锚属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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