Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Electricity440 on March 11, 2013, 10:42:37 am

Title: Save to picture
Post by: Electricity440 on March 11, 2013, 10:42:37 am
On axe parser, how can I save the current screen to an external picture (pic0-9). I am just beginning in axe and I'm making a little draw program and I want them to be able to view it outside of the program.
Thanks
Skyler
Title: Re: Save to picture
Post by: Runer112 on March 11, 2013, 12:38:16 pm
Here's how you could save the contents of the screen buffer to Pic0, following the general recipe for saving data to an OS variable:

Code: [Select]
GetCalc("Pic0",768)→P
!If P
.Could not create picture (not enough RAM), handle error here
Else
Copy(L₆,P,768)
End
Title: Re: Save to picture
Post by: Electricity440 on March 11, 2013, 01:27:33 pm
Thanks, so how would you open one and show it to the screen?
Title: Re: Save to picture
Post by: Hayleia on March 11, 2013, 02:15:50 pm
Thanks, so how would you open one and show it to the screen?
Well, the exact opposite (if appvars and pics work the same) ;)

Code: [Select]
GetCalc("Pic0")→P
!If P
.Picture doesn't exist or is archived, handle error here
Else
Copy(P,L₆,768)
End

If the picture is archived, this should work:
Code: [Select]
GetCalc("Pic0",Y₀)→P
!If P
.Picture doesn't exist, handle error here
Else
Copy(Y₀,L₆,768)
End