Re: Hexagons and stuff
Posted: Sat Aug 04, 2018 6:11 pm
It worked for me.
Questions and answers about the LiveCode platform.
Code: Select all
if (rect pLeft,pTop,pLeft+pWidth,pTop+pWidth of this card) is empty then
Code: Select all
on mouseUp set the vis of img "JOY" to false if exists(img "map") then delete img "map" end if answer file "Select a file" --with filter "Web Graphics,*.jpg;*.gif;*.png" put it into theFilePath if theFilePath = EMPTY then exit mouseup end if import paint from file theFilePath set the name of the last control to "map" set the top of img "map" to 70 set the left of img "map" to 70 set the layer of img "map" to 1 set the top of img "IMP" to -100 put ((the height of img "map") + 140) into HITE put ((the width of img "map") + 140) into WIDD set the height of this stack to HITE set the width of this stack to WIDD set the top of this stack to 100 end mouseUp
It doesn't make any sense and won't parse. Only containers (usually variables) can be empty. This passes a reserved word and a series of unnecessary variables. What's the goal?
That's a fairly common thing to do, though edges outside the card rect won't be visible. Is that what you mean? Another alternative is to resize the image to fit the card. That's usually less intrusive than changing the window size, depending on the usage.If the imported image is bigger than the stack everything screws up.
If you play with my latest version (choosing a biggish image) you will see that the stack resizes to accommodate the image to be sliced.That's usually less intrusive than changing the window size, depending on the usage.