MeshDrawer2D
from panda3d.core import MeshDrawer2D
- class MeshDrawer2D
Bases:
Bases:
TypedObject
This class allows the drawing of 2D objects - mainly based on quads and rectangles. It allows clipping and several high level UI theme functions.
Inheritance diagram
- __init__()
Creates the
MeshDrawer2D
low level system.
- begin()
Opens up the geom for drawing, don’t forget to call
MeshDrawer2D.end()
- end()
Finish the drawing and clearing off the remaining vertexes.
- static get_class_type() TypeHandle
- quad_raw(v1: LVector3, c1: LVector4, uv1: LVector2, v2: LVector3, c2: LVector4, uv2: LVector2, v3: LVector3, c3: LVector4, uv3: LVector2, v4: LVector3, c4: LVector4, uv4: LVector2)
Draws a 2D rectangle. Ignores the clipping rectangle.
- rectangle(x: float, y: float, w: float, h: float, u: float, v: float, us: float, vs: float, color: LVector4)
Draws a 2D rectangle which can be clipped.
- rectangle_border(x: float, y: float, w: float, h: float, r: float, t: float, l: float, b: float, tr: float, tt: float, tl: float, tb: float, u: float, v: float, us: float, vs: float, color: LVector4)
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture
- rectangle_border_tiled(x: float, y: float, w: float, h: float, r: float, t: float, l: float, b: float, tr: float, tt: float, tl: float, tb: float, u: float, v: float, us: float, vs: float, color: LVector4)
Draws a 2d rectangle, with borders and corders, taken from the surrounding texture
- rectangle_raw(x: float, y: float, w: float, h: float, u: float, v: float, us: float, vs: float, color: LVector4)