0 to 5 | GRP0 to GRP5 |
GTARGET 0
Drawing target page
WP=GTARGET()
・The color is expressed as an 8-digit hexadecimal number.
・Specify 2 digits each A, R, G and B like &HAARRGGBB.
・Specify 0 to 255 (&H00 to &HFF): A for transparency, R for red, G for green, and B for blue.
・A (transparency) of 0 is completely transparent and 255 is completely opaque.
・It can be specified easily using RGB functions or color constants starting with #C_.
GCOLOR &HFF0A141E GCOLOR RGB(255,10,20,30) GCOLOR #C_BLUE
Graphic drawing color
C = GCOLOR()
Transparency: 0 to 255
・255 is the default.
Color elements: R, G, B each 0 to 255
・Color examples
Black | RGB(0,0,0) |
White | RGB(255,255,255) |
Light Gray | RGB(224,224,224) |
Gray | RGB(128,128,128) |
Dark Gray | RGB(64,64,64) |
Red | RGB(255,0,0) |
Pink | RGB(255,96,208) |
Purple | RGB(160,32,255) |
Light Blue | RGB(80,208,255) |
Blue | RGB(0,32,255) |
Yellow Green | RGB(96,255,128) |
Green | RGB(0,192,0) |
Yellow | RGB(255,224,32) |
Orange | RGB(255,160,16) |
Brown | RGB(160,128,96) |
Light Red | RGB(255,208,160) |
Color code calculated from the argument
C1=RGB(0,100,200) C2=RGB(128,0,100,200)
Replacement source color code
Replace color component
・Specify a value between 0 and 255.
・If each one is not specified, the corresponding component of the replacement source color code is used as it is.
Color code calculated from the argument
C1=RGB(#C_RED, 127,,,) 'Translucent red C2=RGB(#C_BLUE,,255,,) 'Purple
ARGB 8-bit color code
・See GCOLOR for a description of color codes.
Variable that receives the transparency information of the specified color code
・Returns a value between 0 and 255.
Variable that receives the color component information of the specified color code
・Returns values between 0 and 255 respectively.
RGB C OUT R,G,B
Transparency: 0 to 1.0
・1.0 is the default.
Color elements: R, G, B each 0 to 1.0
Color code calculated from the argument
Replacement source color code
Replace color component
・Specify a value between 0 and 1.0.
・If each one is not specified, the corresponding component of the replacement source color code is used as it is.
Color code calculated from the argument
C1=RGBF(#C_RED, 0.5,,,) 'Translucent red C2=RGBF(#C_BLUE,,1.0,,) 'Purple
Color code to get the color component
・See GCOLOR for a description of color codes.
Variable that receives the transparency information of the specified color code
・Returns a value between 0 and 1.0
Variable that receives the color component information of the specified color code
・Returns values between 0 and 1.0 respectively.
Color type (H): Positive value
・It is the same as the angle, and if it exceeds 360, it will be treated as the same color as 0.
・As the number increases, the color changes smoothly from red to yellow to green to blue to purple.
Color vividness (S): 0 to 255
・The smaller the number, the whitish.
Color brightness (V): 0 to 255
・0 indicates black and 255 indicates the brightest.
Transparency to be set in the return color code: 0 to 255
・255 is the default.
Color code equivalent to HSV value
GCLS HSV(100,100,100,100) FOR I=0 TO 360 GPSET I,10,HSV(I,255,255) NEXT
Color code to convert
・See GCOLOR for a description of color codes.
The hue of the specified color
・Returns a value between 0 and 360.
The saturation of the specified color
・Returns a value between 0 and 255.
The brightness of the specified color
・Returns a value between 0 and 255.
Transparency of the specified color
・Returns a value between 0 and 255.
HSV RGB(192,128,0) OUT H,S,V ?H,S,V
Color type (H): Positive value
・Specify the color type from 0 to 1.
・As the number increases, the color changes smoothly from red to yellow to green to blue to purple.
・When it exceeds 1, it returns to the same color as 0.
Color vividness (S): 0 to 1
・The smaller the number, the whitish.
Color brightness (V): 0 to 1
・0 is black and 1 is the brightest.
Transparency to be set in the return color code: 0 to 1
・1 is the default.
Color code equivalent to HSV value
GCLS HSVF(0.4,0.4,0.4,0.4) FOR I=0 TO 360 GPSET I,10,HSVF(I/360,1,1) NEXT
Color code to convert
・See GCOLOR for a description of color codes.
The hue of the specified color
・Returns a value between 0 and 1.0.
The saturation of the specified color
・Returns a value between 0 and 1.0.
The brightness of the specified color
・Returns a value between 0 and 1.0.
Transparency of specified color
・Returns a value between 0 and 1.0.
HSVF RGB(192,128,0) OUT H,S,V ?H,S,V
・When the clipping area is designated, the subsequent graphic drawing commands are operated only within the designated range.
・If all arguments are not specified, the entire graphic page is specified.
The start point coordinates of the clipping area (both X and Y are 0 to 2047)
The end point coordinates of the clipping area (both X and Y are 0 to 2047)
GCLIP 100,100,200,200
The start point coordinates of the clipping region
The end point coordinates of the clipping region
GCLIP OUT LEFT,TOP,RIGHT,BOTTOM
・The range to be filled is the GCLIP setting range.
Color code used for filling
・See GCOLOR for a description of color codes.
・If not specified, it is filled with 0 (transparent color).
GCLS RGB(32,32,32)
The coordinates to get the color of
・If coordinates outside the graphic page range are specified, 0 is returned.
Pixel color code at specified coordinates
・See GCOLOR for a description of color codes.
C=GPGET(100,100)
Coordinates to hit the point
Point color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GPSET 100,50
Start point coordinates
End point coordinates
Line color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GLINE 0,0,399,239,RGB(0,255,255)
Center point coordinates
Circle radius (dot) 1 ~
Circle color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GCIRCLE 200,120,30
Center point coordinates
Circle radius (dot) 1 ~
Start angle and end angle of an arc
・The direction of the clock at 3 o'clock is 0 degree, and the angle advances clockwise.
・Values other than 0 to 360 are fixed to values within 0 to 360. For example, -20 has the same meaning as 340.
0 | Arc |
1 | Fan |
Arc color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GCIRCLE 200,120,30,0,45,1
Start point coordinates
End point coordinates
Rectangle color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GBOX 0,0,399,239
Start point coordinates
End point coordinates
Rectangle color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GFILL 0,0,399,239
・When the border color is not specified, the color range at the start point coordinates is painted.
Coordinates at which to start filling
The color to use for the fill
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
The color to see as the border of the fill
・If not specified, all colors that are different from the fill color are seen as boundaries.
GPAINT 200,120,RGB(255,0,0),RGB(0,0,0)
Default | Current Drawing Page |
0 to 5 | GRP0 to GRP5 |
Start point and end point coordinates of the copy source range
Start point coordinates of the copy destination range
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 |
GCOPY 0,0,0,100,100,200,100 ,1
Copy source graphic page: 0 to 5
Start point and end point coordinates of the copy source range
Start point coordinates of the copy destination range
Color code to multiply with the source pixel
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 |
GCOPY 0,0,0,100,100,200,100,#C_RED,1
Default | Current Drawing Page |
0 to 5 | GRP0 to GRP5 |
Start point X, Y coordinate, width, height of the copy source range
・If not specified, the current clipping area is used.
Array variable that stores the image
・If there are not enough elements in the array, it is automatically added only to the 1D array.
DIM WORK[0] GSAVE 0,0,0,512,512,WORK
Start point X, Y coordinate, width, height of the copy destination range
・If not specified, the current clipping area is used.
Numeric array that stores image data by GSAVE
Color code to multiply the image data in the image array
・If not specified, the image array is used as it is.
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 |
GLOAD 0,0,512,512,WORK,0 GLOAD WORK,#C_RED,0
Start point X, Y coordinate, width, height (dot) of the copy destination range
・If not specified, the current clipping area is used.
Numeric array containing images stored in indexed image format
Numeric array containing palette data
・The palette data is a numerical array having more elements than the maximum number used in the index image, and each element contains a color code corresponding to the numerical value in the index image.
Color code to multiply the image data in the image array
・If not specified, the image array is used as it is.
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 |
GLOAD 0,0,512,512,WORK,PALETTE,0 GLOAD WORK,PALETTE,#C_BLUE,1
Vertex 1
Vertex 2
Vertex 3
Triangle color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GTRI 200,10,300,200,100,200
Display coordinates
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.
The type of font to reference: 8 or 16 can be specified.
・16 is the default.
Display magnification: 1 to 32767
・If not specified, 1,1 (the same size) is specified.
Text color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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 |
・0 is the default.
GPUTCHR 10,10,"ABC" GPUTCHR 20,20,&H60
Display coordinates
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.
The type of font to reference: 8 or 16 can be specified.
・16 is the default.
Display magnification: 1 to 32767
・If not specified, 1,1 (the same size) is specified.
Text color to draw
・See GCOLOR for a description of color codes.
・If not specified, the color set in GCOLOR is used.
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.
Space between characters (in pixels): 0 to 64
・If not specified, it's 1.
GPUTCHRP 10,10,"ABC" GPUTCHRP 10,10,&H55
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.
The type of font to reference: 8 or 16 can be specified.
・16 is the default.
Display magnification: 1 to 32767
・If not specified, 1 (the same size) is specified.
Space between characters (in pixels): 0 to 64
・If not specified, it's 1.
The drawing width (pixels) when drawing with GPUTCHRP
W=GPUTCHRP("ABC") W2=GPUTCHRP(&H55,16,1,2)
・Graphic pages can be directly read and written as an Int type 2D array.
・Use GUPDATE to reflect the written results.
・Specify the target page to get the array.
0 to 5 | GRP0 to GRP5 |
An Int type 2D array representing the contents of the target page.
G=GARRAY(0) G[0,0]=#C_WHITE PRINT HEX$(G[100,100])
・Since normal graphic drawing commands internally perform processing equivalent to GUPDATE, so using GUPDATE after executing drawing commands has no effect.
・Even if you don't use GUPDATE, it will be reflected automatically if you write with other drawing commands near the writing coordinates.
Graphic page to reflect
0 to 5 | GRP0 to GRP5 |
Start and end coordinates of the rectangular area to be reflected (each 0 to 2047)
・Coordinate specification is handled as clue information, and the part that is outside the region may be updated.
G=GARRAY(0) G[0,0]=#C_WHITE GUPDATE 0
・Sampling refers to determining which coordinates on the graphic page are referenced from the UV coordinates when referring to the color from the graphic page on a sprite or text screen.
・It cannot be changed to sprite units, text screen units, or layer units.
Graphic page to set: 0 to 5
0 | Border (UV coordinates other than 0 to 2047 are transparent) |
1 | Repeat (treats the graphic page as if it was repeated outside 0-2047) |
Graphic page to retrieve settings: 0 to 5
Currently set sampling type