return to the original after a flip horizontal

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

return to the original after a flip horizontal

Post by jmburnod » Sat Apr 04, 2015 12:32 pm

Hi All,
I noticed that when we flip horizontal a referenced file image.
It seems do a new flip horizontal is the only way to return to the original.
I expected something like that:

Code: Select all

lock screen
put the filename of img "myImage" into tPathImg
set the filename of img "myImage" to empty
wait 1 milliseconds
set the filename of img "myImage" to tPathImg
to return to the original, but it doesn't work

Best regards
Jean-Marc
Last edited by jmburnod on Sat Apr 04, 2015 1:05 pm, edited 1 time in total.
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: return to the original after a flim horizontal

Post by Klaus » Sat Apr 04, 2015 12:36 pm

Yep, when FLIPping you set a property of the image CONTAINER and not of its content.
So once set, it stays even after you put new content into that container, just like a field with its forecolor set.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: return to the original after a flim horizontal

Post by jmburnod » Sat Apr 04, 2015 12:58 pm

Thanks Klaus,
you set a property of the image CONTAINER
It is possible to check this property ?
Fortunately LC dysplay the same image as file image at preopenstack or openstack 8)
https://alternatic.ch

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: return to the original after a flim horizontal

Post by Klaus » Sat Apr 04, 2015 2:22 pm

Hi Jean-Marc,
jmburnod wrote:Thanks Klaus,
you set a property of the image CONTAINER
It is possible to check this property ?
good question indeed!
I searched the dictionary, but looks like we cannot check this!? :shock:


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10102
Joined: Fri Feb 19, 2010 10:17 am

Re: return to the original after a flip horizontal

Post by richmond62 » Sat Apr 04, 2015 3:00 pm

"It seems do a new flip horizontal is the only way to return to the original."

Why is this a problem?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: return to the original after a flip horizontal

Post by jmburnod » Sat Apr 04, 2015 4:35 pm

@Klaus,

I've also searched in the keys of the properties of img but I didn't found something useful

@Richmond,
The problem is when you tell a story that would be useful to know if one img has been flipped or not
https://alternatic.ch

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: return to the original after a flip horizontal

Post by SparkOut » Sat Apr 04, 2015 9:43 pm

http://docs.runrev.com/Command/flip said, back in the day
Important! Flipping a referenced image changes its orientation only temporarily. The next time the referenced image is displayed, its original orientation returns.
So I am thinking the changes to the rendering in later versions of LC must be responsible, related to the image caching? Is there any way to flush the cache? I tried by setting the imageData to empty, setting the text of the image to empty, and

Code: Select all

prepare image file <the referenced image path>
to see if that would force the caching to be updated, but no go. I also delved into the IDE scripts but could only step into the lines at the same script level. Once the ide says "flip image <id> horizontal" the engine does its thing and I couldn't see how to follow where it went to do it, and it doesn't seem to set any properties that can be checked to see if a flip has been set.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: return to the original after a flip horizontal

Post by jmburnod » Sun Apr 05, 2015 9:54 am

Hi SparkOut,
Thanks for try
I read in this doc :
The next time the referenced image is displayed, its original orientation returns.
What have we to understand about "next time the referenced image is displayed". It seems that is only at preopenstack or openstack.
Best regards
Jean-Marc
https://alternatic.ch

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: return to the original after a flip horizontal

Post by SparkOut » Sun Apr 05, 2015 11:23 am

Release notes for 6.1.0-rc3 mentioned a fix for Crash on flip of referenced image. Perhaps it got nailed down too hard?

Fwiw, setting the imageCacheLimit to 0 or 1, changing the referenced image path and resetting the imageCacheLimit to default size does not help either.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: return to the original after a flip horizontal

Post by jmburnod » Tue Apr 07, 2015 6:27 pm

Thanks Sparkout,
Is that would be a topic for "feature request" forum ?
Best
Jean-Marc
https://alternatic.ch

Post Reply