Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Axe Programmer on September 06, 2013, 11:19:11 am
-
I want to make a flipbook program that is fast and easy to use. i want to be able to store the pixels drawn on the graph screen (when the user presses enter) into an external variable that can later recall that saved picture. how do i save what is on the graph screen as a variable or something?
-
The graph screen is L6, so it should be as simple as something like this:
.Use 768 if images are created outside of the OS and may contain data in the last row
!If GetCalc("Pic0",756)→P
.Not enough RAM
End
Copy(L₆,P,756)
-
Actually the graph screen is L6, aka plotSScreen. All you have to do to save it in a var is to create for example a 768-bytes appvar (plotSScreen is 768 bytes large) and copy L6 to it. The proper way to do this would be :
:GetCalc("appvSAVEDIMG",768)→A
:Return!If A // quits if the appvar couldn't be created
:Copy(L6,A) // optimized version, copies 768 bytes from A to L6
EDIT : ninja'd :ninja:
-
how do i recall pic 0 on the screen?
sorry i am kind of new at this..
-
The graph screen is L6, so it should be as simple as something like this:
!If GetCalc("Pic0",768)→P
.Not enough RAM
End
Copy(L₆,P,768)
Actually that's kinda wrong, since TI-OS pics are 756 bytes.
how do i recall pic 0 on the screen?
sorry i am kind of new at this..
All you have to do is to access TI-OS's Pic0 with GetCalc and copy it back to L6 (remember it's 756 bytes this time) :
GetCalc("Pic0")→A
Copy(A,L6,756)
DispGraph
-
The graph screen is L6, so it should be as simple as something like this:
!If GetCalc("Pic0",768)→P
.Not enough RAM
End
Copy(L₆,P,768)
Actually that's kinda wrong, since TI-OS pics are 756 bytes.
how do i recall pic 0 on the screen?
sorry i am kind of new at this..
All you have to do is to access TI-OS's Pic0 with GetCalc and copy it back to L6 (remember it's 756 bytes this time) :
GetCalc("Pic0")→A
Copy(A,L6,756)
DispGraph
it's possible to create 768 bytes pics too actually (779 total with the var name and stuff). You need to store it with the xLIB storepic command then the 96x64 pic can be recalled fine using TI-OS recallpic functions.
-
using OS functions to recall still chops off the bottom row of pixels, though, doesn't it?
-
I think I recall displaying such pic fine before. The only real issues I had was with early versions of xLIB, where the last row usually turned into garbage.
-
using OS functions to recall still chops off the bottom row of pixels, though, doesn't it?
You're correct. ;)
-
thanks for the help guys