Page 2 of 2

Re: How to save a graphic on a card using paint tools

Posted: Tue Oct 28, 2025 9:58 pm
by dunbarx
Jacque.

The "cantModify" of the test stack I made was "false".

Craig

Re: How to save a graphic on a card using paint tools

Posted: Tue Oct 28, 2025 11:17 pm
by bn
dunbarx wrote: Tue Oct 28, 2025 9:56 pm I 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? :(
Craig,
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

Posted: Wed Oct 29, 2025 12:18 am
by jacque
jacque wrote: Tue Oct 28, 2025 8:20 pm
Klaus wrote: Tue Oct 28, 2025 7:03 pm Yes, but in that case you cannot even draw anything on a card at all!
I think you can, you can do almost anything but leaving the card removes all changes. Maybe something changed?
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.

Re: How to save a graphic on a card using paint tools

Posted: Wed Oct 29, 2025 11:02 am
by richmond62
This ONLY seems to happen if the painting is done programmatically.

Re: How to save a graphic on a card using paint tools

Posted: Wed Oct 29, 2025 5:28 pm
by Martin-HC
bn wrote: Tue Oct 28, 2025 7:13 pm Could you try to create an image object of the size and location you want first and then do your drawing-
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 :D )

Re: How to save a graphic on a card using paint tools

Posted: Wed Oct 29, 2025 6:06 pm
by bn
Hi Martin,

I am glad it works for you.
I'm trying to understand what is really happening.
There is nothing really to understand here except that you hit a bug in LC that is now fixed.

Kind regards
Bernd

Re: How to save a graphic on a card using paint tools

Posted: Thu Oct 30, 2025 5:19 pm
by Martin-HC
Thanks Bernd!