PNMPainter

from panda3d.core import PNMPainter
class PNMPainter

Bases: DTOOL_SUPER_BASE

This class provides a number of convenient methods for painting drawings directly into a PNMImage.

It stores a pointer to the PNMImage you pass it, but it does not take ownership of the object; you are responsible for ensuring that the PNMImage does not destruct during the lifetime of the PNMPainter object.

Inheritance diagram

Inheritance diagram of PNMPainter

__init__(*args, **kwargs)
drawLine()

C++ Interface: draw_line(const PNMPainter self, float xa, float ya, float xb, float yb)

/**
  • Draws an antialiased line on the PNMImage, using the current pen.

*/

drawPoint()

C++ Interface: draw_point(const PNMPainter self, float x, float y)

/**
  • Draws an antialiased point on the PNMImage, using the current pen.

*/

drawRectangle()

C++ Interface: draw_rectangle(const PNMPainter self, float xa, float ya, float xb, float yb)

/**
  • Draws a filled rectangule on the PNMImage, using the current pen for the

  • outline, and the current fill brush for the interior.

  • The two coordinates specify any two diagonally opposite corners.

*/

draw_line()

C++ Interface: draw_line(const PNMPainter self, float xa, float ya, float xb, float yb)

/**
  • Draws an antialiased line on the PNMImage, using the current pen.

*/

draw_point()

C++ Interface: draw_point(const PNMPainter self, float x, float y)

/**
  • Draws an antialiased point on the PNMImage, using the current pen.

*/

draw_rectangle()

C++ Interface: draw_rectangle(const PNMPainter self, float xa, float ya, float xb, float yb)

/**
  • Draws a filled rectangule on the PNMImage, using the current pen for the

  • outline, and the current fill brush for the interior.

  • The two coordinates specify any two diagonally opposite corners.

*/

fill
getFill()

C++ Interface: get_fill(PNMPainter self)

/**
  • Returns the current fill brush. See set_fill().

*/

getPen()

C++ Interface: get_pen(PNMPainter self)

/**
  • Returns the current pen. See set_pen().

*/

get_fill()

C++ Interface: get_fill(PNMPainter self)

/**
  • Returns the current fill brush. See set_fill().

*/

get_pen()

C++ Interface: get_pen(PNMPainter self)

/**
  • Returns the current pen. See set_pen().

*/

pen
setFill()

C++ Interface: set_fill(const PNMPainter self, PNMBrush fill)

/**
  • Specifies a PNMBrush that will be used for filling in the interiors of

  • objects. If the brush is a bitmap brush, its image will be tiled

  • throughout the space.

  • Unlike the PNMImage passed to the constructor, the PNMPainter will take

  • ownership of the fill brush. It is not necessary to keep a separate

  • pointer to it.

*/

setPen()

C++ Interface: set_pen(const PNMPainter self, PNMBrush pen)

/**
  • Specifies a PNMBrush that will be used for drawing lines and edges. If the

  • brush is a bitmap brush, its image will be smeared pixelwise along the

  • line.

  • Unlike the PNMImage passed to the constructor, the PNMPainter will take

  • ownership of the pen. It is not necessary to keep a separate pointer to

  • it.

*/

set_fill()

C++ Interface: set_fill(const PNMPainter self, PNMBrush fill)

/**
  • Specifies a PNMBrush that will be used for filling in the interiors of

  • objects. If the brush is a bitmap brush, its image will be tiled

  • throughout the space.

  • Unlike the PNMImage passed to the constructor, the PNMPainter will take

  • ownership of the fill brush. It is not necessary to keep a separate

  • pointer to it.

*/

set_pen()

C++ Interface: set_pen(const PNMPainter self, PNMBrush pen)

/**
  • Specifies a PNMBrush that will be used for drawing lines and edges. If the

  • brush is a bitmap brush, its image will be smeared pixelwise along the

  • line.

  • Unlike the PNMImage passed to the constructor, the PNMPainter will take

  • ownership of the pen. It is not necessary to keep a separate pointer to

  • it.

*/