manually cutting a picture
Joseph king
king.a.joe at gmail.com
Wed Nov 7 10:52:17 EST 2007
well so far the problem for me is not the linking i have a kinda good
code for that.
here is a little snippet of the idea that i used on an old version
that split the picture without input from the user.
#this code defines that the edges have a place on the grid.
def join_point(self, type):
orect = self.orig_image.get_rect()
if type == "north":
return ((orec.width/2, 20))
but it relies on the fact that the image is on a grid then checks to
see where the puzzle piece is on the grid.
then to actualy link the piece i had this
def draw_connection(self, other)
if self.north == other:
spt = "north"
opt = "south"
pass
which then would check several draw points that are defined in depth.
which i am sure that it can be modified with a little work...... my
main problem is getting the user input on what the size shape and yata
yata of the puzzle piece should be..... sorry if i didn't make sense
before.
More information about the Python-list
mailing list