How to save a graphic on a card using paint tools
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: How to save a graphic on a card using paint tools
Jacque.
The "cantModify" of the test stack I made was "false".
Craig
			
			
									
									
						The "cantModify" of the test stack I made was "false".
Craig
Re: How to save a graphic on a card using paint tools
Craig,dunbarx wrote: ↑Tue Oct 28, 2025 9:56 pmI do not understand. If I paint a line on a new card, it is true that the rect of the "image" of that line fills the card window. Save that stack. It is lost if I close and reopen. An imported image, however, allows the paint to survive if that paint lies within the rect of that image.
What am I missing?![]()
The original poster wanted to paint programatically and noticed that after doing that and he then goes to another card the drawing on the first card was gone. That is what I tried to explain what a probable cause of this could be. It is a bug in LC that was fixed in LC 10.0.2 RC-1. If the OP uses a version before 10.0.2 RC-1 I suggested to first create an image object programmatically and then paint into that image.
That is all I was trying to say. You also can follow the link to Quality Control Center I posted above to see another description of the problem.
Kind regards
Bernd
Re: How to save a graphic on a card using paint tools
I wasn't aware of the image bug, which is probably the cause. But just to note: cantModify does allow scripted changes which is what the OP is doing. I can't recall now whether it acts like HC did, which is to remove any changes when leaving the card.
Jacqueline Landman Gay         |     jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
						HyperActive Software | http://www.hyperactivesw.com
- 
				richmond62
 - Livecode Opensource Backer

 - Posts: 10204
 - Joined: Fri Feb 19, 2010 10:17 am
 
Re: How to save a graphic on a card using paint tools
This ONLY seems to happen if the painting is done programmatically.
			
			
									
									
						Re: How to save a graphic on a card using paint tools
I created a new image with default properties. Then I set the rectangle of the new image to the rect of the painted image (or bigger).
This worked: when I leave the card or close the stack the image is saved.So it looks that your solution is working.
The IDE however is confusing. I'm trying to understand what is really happening.
(note: due to time zone differences and my limited time I can't always respond in a couple of hours. And I have a private life as well
Re: How to save a graphic on a card using paint tools
Hi Martin,
I am glad it works for you.
Kind regards
Bernd
			
			
									
									
						I am glad it works for you.
There is nothing really to understand here except that you hit a bug in LC that is now fixed.I'm trying to understand what is really happening.
Kind regards
Bernd
Re: How to save a graphic on a card using paint tools
Thanks Bernd!
			
			
									
									
						