panda3d.core.MeshDrawer2D

class MeshDrawer2D

Bases: TypedObject

This class allows the drawing of 2d objects - mainly based on quads and rectangles. Allows clipping and serverl high level UI theme functions.

Inheritance diagram

Inheritance diagram of MeshDrawer2D

__init__() → None

Creates the MeshDrawer2D low level system.

setBudget(budget: int) → None

Sets the total triangle budget of the drawer.

getBudget() → int

Gets the total triangle budget of the drawer

getRoot() → NodePath

Returns the root NodePath.

Return type

NodePath

quadRaw(v1: LVector3, c1: LVector4, uv1: LVector2, v2: LVector3, c2: LVector4, uv2: LVector2, v3: LVector3, c3: LVector4, uv3: LVector2, v4: LVector3, c4: LVector4, uv4: LVector2) → None

Draws a 2d rectangle. Ignores the cliping rectangle

rectangleRaw(x: float, y: float, w: float, h: float, u: float, v: float, us: float, vs: float, color: LVector4) → None
setClip(x: float, y: float, w: float, h: float) → None

Sets clipping rectangle

rectangle(x: float, y: float, w: float, h: float, u: float, v: float, us: float, vs: float, color: LVector4) → None

Draws a 2d rectangle, that can be cliped

rectangleBorder(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) → None

Draws a 2d rectangle, with borders and corders, taken from the surrounding texture

rectangleBorderTiled(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) → None

Draws a 2d rectangle, with borders and corders, taken from the surrounding texture

rectangleTiled(x: float, y: float, w: float, h: float, u: float, v: float, us: float, vs: float, color: LVector4) → None

Draws a tiled rectangle, size of tiles is in us and vs

begin() → None

Opens up the geom for drawing, don’t forget to call MeshDrawer2D.end()

end() → None

Finish the drawing and clearing off the remaining vertexes.

static getClassType() → TypeHandle
Return type

TypeHandle