 |
|
BaselScript |
Beschreibung
Graphic functions
All names of these functions are prefixed with "draw"
Get x-coordinate of touch point
#x=$draw.get_x_touch()
Get x-coordinate of touch point
#y=$draw.get_y_touch()
Get tile width in pixels
#w=$draw.get_width(tile name)
Get tile height in pixels
#h=$draw.get_height(tile name)
Get text width in pixels
#w=$draw.get_text_width(string text, font size)
Get text height in pixels
#h=$draw.get_text_height(string text, font size)
Get text parameters ( width & height ) in pixel
#empty=$draw.get_text_parameters(string text, font size)
Result: #_text_width, #_text_height
Get tile visible (0/1)
#s=$draw.get_visible(tile name)
Result: 0-invisible 1-visible
Set tile visible
#empty=$draw.set_visible(tile name, 0/1)
Get x1-coordinate of tile
#x1=$draw.get_x1(tile name)
Get y1-coordinate of tile
#y1= $draw.get_y1(tile name)
Get x2-coordinate of tile
#x2=$draw.tile_x2(tile name)
Get y2-coordinate of tile
#y2=$draw.get_y2(tile name)
Set x1-coordinate of tile
#empty=$draw.set_x1(tile name, value)
Set y1-coordinate of tile
#empty=$draw.set_y1(tile name, value)
Set x2-coordinate of tile
#empty=$draw.set_x2(tile name, value)
Set y2-coordinate of tile
#empty=$draw.set_y2(tile name, value)
Get tile color
#color=$draw.get_color(tile name)
Set tile color
#empty=$draw.set_color(tile name, value)
Get tile bgcolor
#bg=$draw.get_bgcolor(tile name)
Set tile color
#empty=$draw.set_bgcolor(tile name, value)