From 479db5290ce86610c3a913141574bcce1c66b97e Mon Sep 17 00:00:00 2001 From: nhydock Date: Wed, 24 Nov 2010 18:56:26 -0500 Subject: [PATCH] Adds valignment as a parameter to drawImage. --- src/GameEngine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GameEngine.py b/src/GameEngine.py index f2270e728..d276f2c1e 100644 --- a/src/GameEngine.py +++ b/src/GameEngine.py @@ -832,7 +832,7 @@ def drawStarScore(self, screenwidth, screenheight, xpos, ypos, stars, scale = No def drawImage(self, image, scale = (1.0, -1.0), coord = (0, 0), rot = 0, \ color = (1,1,1,1), rect = (0,1,0,1), stretched = 0, fit = 0, \ - alignment = 1): + alignment = 1, valignment = 1): """ Draws the image/surface to screen @@ -855,6 +855,8 @@ def drawImage(self, image, scale = (1.0, -1.0), coord = (0, 0), rot = 0, \ on the top side (1), bottom side (2), or center point (any other value) of the image @param alignment: Adjusts the texture so the coordinate for x-axis placement can either be on the left side (0), center point (1), or right(2) side of the image + @param valignment: Adjusts the texture so the coordinate for y-axis placement can either be + on the bottom side (0), center point (1), or top(2) side of the image """ width, height = scale @@ -882,6 +884,7 @@ def drawImage(self, image, scale = (1.0, -1.0), coord = (0, 0), rot = 0, \ image.setScale(width, height) image.setPosition(x, y) image.setAlignment(alignment) + image.setVAlignment(valignment) image.setAngle(rot) image.setColor(color) image.draw()