def paintBorder(self, image):
     layer = self.getBorderLayer(image)
     util = LayerUtil(image)
     util.selectAll()
     util.select(ECst.CARD_BORDER, ECst.CARD_BORDER,
                 layer.width - 2 * ECst.CARD_BORDER,
                 layer.height - 2 * ECst.CARD_BORDER, CHANNEL_OP_SUBTRACT)
     util.fillGradient(layer, ECst.GRAD_CARD_BORDER, 0, 0,
                       ECst.CARD_DIMENSION[0], ECst.CARD_DIMENSION[1])
     return
 def getBorderLayer(self, image):
     lyUtil = LayerUtil(image)
     layer = lyUtil.getLayerByName(ECst.LY_BORDER)
     if not layer:
         layer = lyUtil.renderNewLayer(ECst.LY_BORDER,
                                       ECst.CARD_DIMENSION[0],
                                       ECst.CARD_DIMENSION[1])
     lyUtil.setLayerPostion(layer, LayerUtil.LY_TOP_POSITION)
     return layer
Пример #3
0
 def __init__(self, image, trId):
     LayerUtil.__init__(self, image)
     self.id = trId
     return
Пример #4
0
 def __init__(self, image):
   LayerUtil.__init__(self, image)
Пример #5
0
 def __init__(self, image, name, damage, trId):
     LayerUtil.__init__(self, image)
     self.id = trId
     self.name = name
     self.damage = damage
     return
 def __init__(self, image, pictureFile, trId):
     LayerUtil.__init__(self, image)
     self.id = trId
     self.pictureFile = pictureFile
     return
 def __init__(self, image, name, damage, trId):
   LayerUtil.__init__(self, image)
   self.id = trId
   self.name = name
   self.damage = damage
   return
 def __init__(self, image, trId):
   LayerUtil.__init__(self, image)
   self.id = trId
   return
 def __init__(self, image, pictureFile, trId):
   LayerUtil.__init__(self, image)
   self.id = trId
   self.pictureFile = pictureFile
   return