Post Reply 
A query on Graphics Syntax
05-13-2016, 05:15 PM (This post was last modified: 05-13-2016 05:34 PM by StephenG1CMZ.)
Post: #1
A query on Graphics Syntax
A couple of questions on Graphics Syntax...

Is it possible to use something more generic than G7 in a graphics command - GN, in case the user is using G7?

Is it possible to use AFiles instead of G7 - they both represent graphics objects?

Code:


 LOCAL GN;
 EXPORT TRYA()
 //EXAMPLE ASSUMES REFERENCED FILE
 //IS AN EXISTING PNG
 BEGIN 
  //I WANT TO REFERENCE GN INSTEAD OF CODING IN A SPECIFIC Gn
  //TO MAKE CODE MORE FLEXIBLE
  GN:='G6';
  DIMGROB(GN,320,240);//NO COMPLAINTS
  GN:=AFiles("BSL_A");
  //BLIT_P(G0,GN);//RUNTIME ERR HERE IF UNCOMMENTED
  WAIT;
  //CAN I AVOID USING Gn
  //AND USE AFiles DIRECTLY?
  //IT RETURNS A GRAPHIC OBJECT DOESNT IT?
  //NO IT DOESNT
  MSGBOX(AFiles);//CONFIRM FILE EXISTS
  BLIT_P(G0,AFiles("BSL_A"));//NO ITS A RUNTIME ERROR
  WAIT;
  
  FREEZE;
 END;

The code so far suggests not - but perhaps the experts have a solution.

Also, in the on-calculator help (Android version) there is a reference to DIMGROB/GROB size (320,1240)... I assume that is a misprint for 240, not an upgrade to a HD resolution. Sad

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
A query on Graphics Syntax - StephenG1CMZ - 05-13-2016 05:15 PM
RE: A query on Graphics Syntax - Arno K - 05-13-2016, 11:27 PM



User(s) browsing this thread: 1 Guest(s)