Paint: brush, texturing...

Paint: brush, texturing...

pymt.graphx.paint.set_brush(sprite, size=None)

Define the brush to use for paint* functions

Parameters :
sprite : string

Filename of image brush

size : int, default to None

Size of brush

pymt.graphx.paint.set_brush_size(size)

Define the size of current brush

Parameters :
size : int

Size of brush

pymt.graphx.paint.set_texture(texture, target=None)

Same as glBindTexture, except he can take integer/long or Texture/TextureRegion

pymt.graphx.paint.get_texture_id(texture)

Return the openid of texture

pymt.graphx.paint.get_texture_target(texture)

Return the target of texture. If none, return GL_TEXTURE_2D

pymt.graphx.paint.paintLine(points, numsteps=None, **kwargs)

Paint a line with current brush

set_brush("mybrush.png", 10)
paintLine((0, 0, 20, 50))
paintLine((1, 2, 1, 5, 4, 6, 8, 7))

Previous topic

Fbo: abstraction to use hardware/software FrameBuffer object

Next topic

Shader: abstract compilation and usage

This Page