Class GraphObject

来源:互联网 发布:中国足球知乎 编辑:程序博客网 时间:2024/06/05 04:47

This is the abstract base class for all graphical objects. Classes inheriting from GraphObject include: Shape, TextBlock, Picture, and Panel. From the Panel class the Part class is derived, from which the Node and Link classes derive.

这是所有图形对象的抽象基类。 从GraphObject继承的类包括:Shape,TextBlock,Picture和Panel。 从Panel类中派生Part类,Node类和Link类派生。

It is very common to make use of the static function GraphObject.make in order to build up a visual tree of GraphObjects. You can see many examples of this throughout the Introduction, starting at Building Objects, and the Samples, starting with Minimal Sample.

使用静态函数GraphObject.make来构建GraphObjects的可视树是非常常见的。 您可以在整个简介中看到很多例子,从建筑物对象开始,样本以最小样本开始。

Since GraphObject is an abstract class, programmers do not create GraphObjects themselves, but this class defines many properties used by all kinds of GraphObjects.

由于GraphObject是一个抽象类,程序员不会自己创建GraphObjects,但是这个类定义了各种GraphObjects使用的许多属性。

The only visual properties on GraphObject are background and areaBackground. However one can control whether the GraphObject is drawn at all by setting visible, or by setting opacity to zero if you still want the GraphObject to occupy space. Also, if you want to control whether any mouse or touch events "see" the GraphObject, you can set pickable to false.

GraphObject上唯一的视觉属性是background和areaBackground。 但是,您可以通过设置visible来控制是否绘制GraphObject,或者如果仍然希望GraphObject占用空间,则可以将透明度设置为零。 另外,如果要控制是否有任何鼠标或触摸事件“查看”GraphObject,您可以将可选项设置为false。

For more information about specifying how things get drawn, see the properties on the Shape, TextBlock, and Picture classes.

有关指定绘制事情的更多信息,请参阅Shape,TextBlock和Picture类的属性。


0 0
原创粉丝点击