Touhou Wiki
Advertisement

Drawing Functions

Functions to draw graphics.

DrawGraphic

Draw the prepared graphic. The arguments are the coordinates of the center.

2 Parameters
    1) x-coordinate
    2) y-coordinate

LoadGraphic

Load the graphic from the file on the memory. BMP and PNG files can be loaded. The black region (R, G, B = 0, 0, 0) is transparent, or blending can be performed when PNG's alpha values are indicated, too.

1 Parameter
    1) path of the graphic (string)

DeleteGraphic

Remove the graphic loaded on the memory.

1 Parameter
    1) path of the loaded graphic (string)

SetTexture

Set the graphic drawn by DrawGraphic.

1 Parameter
    1) path of the loaded graphic (string)

SetGraphicRect

Set the rectangular drawing region of the graphic drawn by DrawGraphic.

4 Parameters
    1) left
    2) top
    3) right
    4) bottom

SetGraphicScale

Set the scaling parameters for DrawGraphic.

2 Parameters
    1) x-scale (1 is the same size)
    2) y-scale (1 is the same size)

SetGraphicAngle

Set the rotation angle of the graphic drawn by DrawGraphic.

3 Parameters
    1) x-angle (0 ~ 360, not radian)
    2) y-angle (0 ~ 360)
    3) z-angle (0 ~ 360)

SetAlpha

Set the alpha value (opacity) for DrawGraphic.

1 Parameter
    1) alpha value (0 ~ 255)

SetColor

Set the blending color for DrawGraphic. SetColor(255, 255, 255); is the default color.

3 Parameters
    1) red (0 ~ 255)
    2) green (0 ~ 255)
    3) blue (0 ~ 255)

SetRenderState

Set the render type for DrawGraphic.

1 Parameter
    1) render type
        ALPHA   : alpha blend
        ADD     : additive blend
        MULTIPLY: multiplicative blend
        SUBTRACT: subtractive blend

DrawText

Draw the text. This function is very heavy.

5 Parameters
    1) drawn string
    2) x-coordinate
    3) y-coordinate
    4) character size
    5) alpha value (0 ~ 255)

SetFontColor

Set the font color for DrawText. The color can be gradated.

6 Parameters
    1) red of top (0 ~ 255)
    2) green of top (0 ~ 255)
    3) blue of top (0 ~ 255)
    4) red of bottom (0 ~ 255)
    5) green of bottom (0 ~ 255)
    6) blue of bottom (0 ~ 255)

Advertisement