PGVirtualFrame
from panda3d.core import PGVirtualFrame
- class PGVirtualFrame
Bases:
PGItem
This represents a frame that is rendered as a window onto another (possibly much larger) canvas. You can only see the portion of the canvas that is below the window at any given time.
This works simply by automatically defining a scissor effect to be applied to a special child node, called the canvas_node, of the PGVirtualFrame node. Every object that is parented to the canvas_node will be clipped by the scissor effect. Also, you can modify the canvas_transform through convenience methods here, which actually modifies the transform on the canvas_node.
The net effect is that the virtual canvas is arbitrarily large, and we can peek at it through the scissor region, and scroll through different parts of it by modifying the canvas_transform.
See PGScrollFrame for a specialization of this class that handles the traditional scrolling canvas, with scroll bars.
Inheritance diagram
- __init__(*args, **kwargs)
- canvas_node
- canvas_parent
- canvas_transform
- clearClipFrame()
C++ Interface: clear_clip_frame(const PGVirtualFrame self)
- /**
Removes the clip frame from the item. This disables clipping.
*/
- clear_clip_frame()
C++ Interface: clear_clip_frame(const PGVirtualFrame self)
- /**
Removes the clip frame from the item. This disables clipping.
*/
- clip_frame
- getCanvasNode()
C++ Interface: get_canvas_node(PGVirtualFrame self)
- /**
Returns the special node that holds all of the children that appear in the
virtual canvas.
*/
- getCanvasParent()
C++ Interface: get_canvas_parent(PGVirtualFrame self)
- /**
Returns the parent node of the canvas_node.
*/
- getCanvasTransform()
C++ Interface: get_canvas_transform(PGVirtualFrame self)
- /**
Returns the transform of the virtual canvas. This transform is applied to
all child nodes of the canvas_node.
*/
- getClassType()
C++ Interface: get_class_type()
- getClipFrame()
C++ Interface: get_clip_frame(PGVirtualFrame self)
- /**
Returns the bounding rectangle of the clip frame. See set_clip_frame().
If has_clip_frame() is false, this returns the item’s actual frame.
*/
- get_canvas_node()
C++ Interface: get_canvas_node(PGVirtualFrame self)
- /**
Returns the special node that holds all of the children that appear in the
virtual canvas.
*/
- get_canvas_parent()
C++ Interface: get_canvas_parent(PGVirtualFrame self)
- /**
Returns the parent node of the canvas_node.
*/
- get_canvas_transform()
C++ Interface: get_canvas_transform(PGVirtualFrame self)
- /**
Returns the transform of the virtual canvas. This transform is applied to
all child nodes of the canvas_node.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_clip_frame()
C++ Interface: get_clip_frame(PGVirtualFrame self)
- /**
Returns the bounding rectangle of the clip frame. See set_clip_frame().
If has_clip_frame() is false, this returns the item’s actual frame.
*/
- hasClipFrame()
C++ Interface: has_clip_frame(PGVirtualFrame self)
- /**
Returns true if the clip frame has been set; see set_clip_frame(). If it
has not been set, objects in the virtual frame will not be clipped.
*/
- has_clip_frame()
C++ Interface: has_clip_frame(PGVirtualFrame self)
- /**
Returns true if the clip frame has been set; see set_clip_frame(). If it
has not been set, objects in the virtual frame will not be clipped.
*/
- setCanvasTransform()
C++ Interface: set_canvas_transform(const PGVirtualFrame self, const TransformState transform)
- /**
Changes the transform of the virtual canvas. This transform is applied to
all child nodes of the canvas_node.
*/
- setClipFrame()
C++ Interface: set_clip_frame(const PGVirtualFrame self, const LVecBase4f clip_frame) set_clip_frame(const PGVirtualFrame self, float left, float right, float bottom, float top)
- /**
Sets the bounding rectangle of the clip frame. This is the size of the
small window through which we can see the virtual canvas. Normally, this
is the same size as the actual frame or smaller (typically it is smaller by
the size of the bevel, or to make room for scroll bars).
*/
- /**
Sets the bounding rectangle of the clip frame. This is the size of the
small window through which we can see the virtual canvas. Normally, this
is the same size as the actual frame or smaller (typically it is smaller by
the size of the bevel, or to make room for scroll bars).
*/
- set_canvas_transform()
C++ Interface: set_canvas_transform(const PGVirtualFrame self, const TransformState transform)
- /**
Changes the transform of the virtual canvas. This transform is applied to
all child nodes of the canvas_node.
*/
- set_clip_frame()
C++ Interface: set_clip_frame(const PGVirtualFrame self, const LVecBase4f clip_frame) set_clip_frame(const PGVirtualFrame self, float left, float right, float bottom, float top)
- /**
Sets the bounding rectangle of the clip frame. This is the size of the
small window through which we can see the virtual canvas. Normally, this
is the same size as the actual frame or smaller (typically it is smaller by
the size of the bevel, or to make room for scroll bars).
*/
- /**
Sets the bounding rectangle of the clip frame. This is the size of the
small window through which we can see the virtual canvas. Normally, this
is the same size as the actual frame or smaller (typically it is smaller by
the size of the bevel, or to make room for scroll bars).
*/