Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.
	Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
			
		
		
			- 
				
																			
								jawall							 
									
		- Posts: 31
 		- Joined: Wed Sep 12, 2012 1:43 pm
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by jawall » Sat Nov 09, 2013 8:21 am
			
			
			
			
			good morning,
I can sucessfully
1. 
set the width of image myImage to myWidth
2. 
set the angle of image myImage to myDegrees
But not both at the same time. When I do step 2 the width is (visually) the same as it was in the original, not what I have set it to in step 1 and I cannot find any way to change that.
Do you encounter the same behavior? Do you knw a way to work around?
Thank you
Jürgen
 
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								Simon							 
						- VIP Livecode Opensource Backer

 			
		- Posts: 3901
 		- Joined: Sat Mar 24, 2007 2:54 am
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by Simon » Sat Nov 09, 2013 8:46 am
			
			
			
			
			Hi Jürgen,
Yes, I'm seeing the same thing here.
A work around uses the very cool
Code: Select all
set the imagedata of image tImageName to the imagedata of image tImageName
This does it with a clone of an original hidden image (just in case you need to change the size again)
Code: Select all
on mouseUp
   clone img 1
   set vis of last img to true
   set the width of last img to 50
   set the imagedata of last img to the imagedata of last img  --NEAT-O!
   set the angle of last img to 90
end mouseUp
Simon
Edit: I didn't spend much time trying the figure out better ways.  There are probably many of them.
 
			
			
									
									I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								jawall							 
									
		- Posts: 31
 		- Joined: Wed Sep 12, 2012 1:43 pm
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by jawall » Thu Nov 14, 2013 7:27 am
			
			
			
			
			Hey Simon,
thanks for the suggestion.
I tried your work around to no avail (but a crash of livecode). Where exactly would you put it in a handler? Like this?
Code: Select all
on mouseUp
   put the formattedheight of image 1 into h
   put the formattedwidth of image 1 into w
   set the height of image 1 to h/2
   set the width of image 1 to w/2
   set the imagedata of image 1 to the imagedata of image 1 -- < here?
   rotate image 1 -90
end mouseUp
Cheers
Jürgen
 
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								Simon							 
						- VIP Livecode Opensource Backer

 			
		- Posts: 3901
 		- Joined: Sat Mar 24, 2007 2:54 am
 		
		
						
						
		
		
						
						
													
							
						
									
						Post
					
								by Simon » Thu Nov 14, 2013 8:32 am
			
			
			
			
			Hi Jürgen,
That works here.
What is your question?
Simon
			
			
									
									I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								Klaus							 
									
		- Posts: 14255
 		- Joined: Sat Apr 08, 2006 8:41 am
 		
		
											
							- 
				Contact:
				
			
 
				
		
		
						
						
													
							
						
									
						Post
					
								by Klaus » Thu Nov 14, 2013 12:47 pm
			
			
			
			
			Hi Jürgen,
did you set the "lockloc" (Lock size and position) of that image to TRUE?
Sound like that is the culprit.
Best
Klaus
			
			
									
									
						 
		 
				
		
		 
	 
	
				
		
		
			- 
				
																			
								jmburnod							 
						- VIP Livecode Opensource Backer

 			
		- Posts: 2729
 		- Joined: Sat Dec 22, 2007 5:35 pm
 		
		
											
							- 
				Contact:
				
			
 
				
		
		
						
						
													
							
						
									
						Post
					
								by jmburnod » Thu Nov 14, 2013 7:51 pm
			
			
			
			
			Hi Jurgen,
What are the result of
Code: Select all
 set the height of image 1 to h/2
set the width of image 1 to w/2
Maeby you can try
Code: Select all
 set the height of image 1 to round(h/2)
 set the width of image 1 to round(w/2)
Best regards
Jean-Marc
 
			
			
									
									https://alternatic.ch