Author Topic: Save to picture  (Read 2015 times)

0 Members and 1 Guest are viewing this topic.

Offline Electricity440

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Save to picture
« 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
« Last Edit: March 11, 2013, 10:59:34 am by Electricity440 »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Save to picture
« Reply #1 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

Offline Electricity440

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 5
  • Rating: +0/-0
    • View Profile
Re: Save to picture
« Reply #2 on: March 11, 2013, 01:27:33 pm »
Thanks, so how would you open one and show it to the screen?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Save to picture
« Reply #3 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
« Last Edit: March 11, 2013, 02:16:47 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s