Difference between revisions of "DCSE:BasicLibs:DrawString"

From Doors CS, Doors CSE, and Doors CE Wiki
Jump to navigationJump to search
(Created page with "This routine is only available on Doors CSE 8.0 and later for the color-screen TI-84 Plus C Silver Edition. ==Description== This function draws a coloured string with a trans...")
 
Line 5: Line 5:
  
 
==Technical Details==
 
==Technical Details==
 +
 +
===DrawString (TI-OS Values)===
 
'''real(6,0,X,Y,COLOUR,NEWLINECHAR,UPDATELCD)''':<br>
 
'''real(6,0,X,Y,COLOUR,NEWLINECHAR,UPDATELCD)''':<br>
 
Ans = Input string<br>
 
Ans = Input string<br>
Line 12: Line 14:
 
NEWLINECHAR = ascii character code that indicates a newline. String moved down 1 line and x is reset<br>
 
NEWLINECHAR = ascii character code that indicates a newline. String moved down 1 line and x is reset<br>
 
UPDATELCD = 0/1 to update LCD after drawing
 
UPDATELCD = 0/1 to update LCD after drawing
 +
 +
Note that the NEWLINE char is the ASCII character code for the character that you want to use. For example the '!'
 +
character is ASCII code 33.
 +
 +
This function draws a coloured string with a transparent background using the custom xLIB palette, in the custom xLIB 8x8
 +
font. The NEWLINECHAR code can be used kind of like a carriage return (X is reset and Y=Y+8). The string data is stored in
 +
ANS.
 +
 +
===DrawStringValueA (TI-OS Values)===
 +
'''real(6,1,X,Y,COLOUR,VALUE,UPDATELCD)''':<br>
 +
X = x value<br>
 +
Y = y value<br>
 +
COLOUR = colour index (standard xLIB palette)<br>
 +
VALUE = value to display<br>
 +
UPDATELCD = 0/1 to update LCD after drawing<br>
 +
 +
This function draws a coloured string of VALUE in the same fashion as DRAWSTRING.
 +
 +
IMPORTANT - VALUE must range from -9999 to 9999 otherwise the TIOS will throw a DIM error.
 +
 +
===DrawStringValueB (Uservar Values)===
 +
'''real(6,1,X,Y,COLOUR,VALUE,UPDATELCD)''':<br>
 +
X = x value<br>
 +
Y = y value<br>
 +
COLOUR = colour index (standard xLIB palette)<br>
 +
VALUE = uservar holding value to display<br>
 +
UPDATELCD = 0/1 to update LCD after drawing<br>
 +
 +
This function is the same as above but takes a Uservar reference for VALUE instead.
  
 
[[Category:Basic Libraries]] [[Category: SDK]]
 
[[Category:Basic Libraries]] [[Category: SDK]]

Revision as of 19:36, 3 November 2013

This routine is only available on Doors CSE 8.0 and later for the color-screen TI-84 Plus C Silver Edition.

Description

This function draws a coloured string with a transparent background using the custom xLIBC palette, in the custom xLIBC 8x8 font. The NEWLINECHAR code can be used kind of like a carriage return (X is reset and Y=Y+8). The string data is stored in Ans.

Technical Details

DrawString (TI-OS Values)

real(6,0,X,Y,COLOUR,NEWLINECHAR,UPDATELCD):
Ans = Input string
X = x value
Y = y value
COLOUR = colour index (standard xLIB palette)
NEWLINECHAR = ascii character code that indicates a newline. String moved down 1 line and x is reset
UPDATELCD = 0/1 to update LCD after drawing

Note that the NEWLINE char is the ASCII character code for the character that you want to use. For example the '!' character is ASCII code 33.

This function draws a coloured string with a transparent background using the custom xLIB palette, in the custom xLIB 8x8 font. The NEWLINECHAR code can be used kind of like a carriage return (X is reset and Y=Y+8). The string data is stored in ANS.

DrawStringValueA (TI-OS Values)

real(6,1,X,Y,COLOUR,VALUE,UPDATELCD):
X = x value
Y = y value
COLOUR = colour index (standard xLIB palette)
VALUE = value to display
UPDATELCD = 0/1 to update LCD after drawing

This function draws a coloured string of VALUE in the same fashion as DRAWSTRING.

IMPORTANT - VALUE must range from -9999 to 9999 otherwise the TIOS will throw a DIM error.

DrawStringValueB (Uservar Values)

real(6,1,X,Y,COLOUR,VALUE,UPDATELCD):
X = x value
Y = y value
COLOUR = colour index (standard xLIB palette)
VALUE = uservar holding value to display
UPDATELCD = 0/1 to update LCD after drawing

This function is the same as above but takes a Uservar reference for VALUE instead.