The Layer Module

This is the class that compose the Image objects. This module will take care of storing data as 3D arrays of uint8. The array dimension are width, height, and RGBA channels of that layer.

This class will be 100% managed through the :py:class`Paynter` class, so you should never instantiate it manually.

The Layer Class

class paynter.layer.Layer(data=None, color=None, effect='')

The Layer class contains a 3D array of N.uint8 and a string with the blend mode of the layer.

An Image starts with one layer inside, but you can create more of them as follows:

from paynter import *

#Inside the paynter there is already an Image with a blank Layer.
paynter = Paynter()

#Create a blank new layer
payner.newLayer()

#Create a new layer duplicating the current one
payner.duplicateActiveLayer()

#Gets the current active layer          
layer = paynter.image.getActiveLayer()
Layer.showLayer(title='', debugText='')

Shows the single layer.

Parameters:
  • title – A string with the title of the window where to render the image.
  • debugText – A string with some text to render over the image.
Return type:

Nothing.