[↑]
SmileBASIC4 Replica Reference
GPUTCHRP
1. Draw proportional characters on graphic pages

GPUTCHRP X,Y,"String"[,FontType[,ColorCode[,DrawingMethod]]]
GPUTCHRP X,Y,"String",FontType,ScaleX,ScaleY,ColorCode[,DrawingMethod[,CharacterSpacing]]

Arguments

X,Y

Display coordinates

String

The string to display
・If an Int is specified instead of a string, the value is treated as a character code and calculates the drawing width for one character of the specified code.

FontType

The type of font to reference: 8 or 16 can be specified.

・16 is the default.

ScaleX,Y

Display magnification: 1 to 32767

・If not specified, 1,1 (the same size) is specified.

ColorCode

Text color to draw

・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.

DrawingMethod

0 Simple Drawing #G_NORMAL
1 Simple Drawing when transparency is not 0 #G_NORMAL2
2 Translucent Drawing #G_ALPHA
3 Translucent Drawing considering transparency of drawing destination #G_ALPHA2
4 Addition Drawing #G_ADD

・1 is the default.

CharacterSpacing

Space between characters (in pixels): 0 to 64
・If not specified, it's 1.

Example

GPUTCHRP 10,10,"ABC" 
GPUTCHRP 10,10,&H55
2. Calculate the drawing width when drawing a string with GPUTCHRP

GPUTCHRP("String"[,FontType[,ScaleX[,CharacterSpacing]]])

Arguments

String

The string to calculate the display width
・If an Int is specified instead of a string, the value is treated as a character code and calculates the drawing width for one character of the specified code.

FontType

The type of font to reference: 8 or 16 can be specified.

・16 is the default.

ScaleX

Display magnification: 1 to 32767

・If not specified, 1 (the same size) is specified.

CharacterSpacing

Space between characters (in pixels): 0 to 64
・If not specified, it's 1.

Return Value

The drawing width (pixels) when drawing with GPUTCHRP

Example

W=GPUTCHRP("ABC")
W2=GPUTCHRP(&H55,16,1,2)
About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|