guipy.utils

Module Contents

Functions

add_vector(a, b)

Adds two vectors (a+b)

sub_vector(a, b)

Subtracts two vectors (a-b)

translate(value, min1, max1, min2, max2)

Maps one value from one range to another range

get_default_font()

clip(value, min1, max1)

float_format(n, exponent)

Attributes

WHITE

Preset for the color White

RED

Preset for the color Red

GREEN

Preset for the color Green

BLUE

Preset for the color Blue

BLACK

Preset for the color Black

LIGHT_GREY

Preset for the color Light Grey

GREY

Preset for the color Grey

DARK_GREY

Preset for the color Dark Grey

ORANGE

Preset for the color Orange

TRANSPARENT

Preset for transparent (for alpha surfaces)

guipy.utils.add_vector(a, b)

Adds two vectors (a+b)

Parameters
  • a

  • b

guipy.utils.sub_vector(a, b)

Subtracts two vectors (a-b)

Parameters
  • a

  • b

guipy.utils.translate(value, min1, max1, min2, max2)

Maps one value from one range to another range

Parameters
  • value – Value to be mapped

  • min1 – Min of range 1

  • max1 – Max of range 1

  • min2 – Min of range 2

  • max2 – Max of range 2

guipy.utils.get_default_font()
guipy.utils.clip(value, min1, max1)
guipy.utils.float_format(n, exponent)
guipy.utils.WHITE = [255, 255, 255]

Preset for the color White

guipy.utils.RED = [255, 0, 0]

Preset for the color Red

guipy.utils.GREEN = [0, 255, 0]

Preset for the color Green

guipy.utils.BLUE = [0, 0, 255]

Preset for the color Blue

guipy.utils.BLACK = [0, 0, 0]

Preset for the color Black

guipy.utils.LIGHT_GREY = [230, 230, 230]

Preset for the color Light Grey

guipy.utils.GREY = [200, 200, 200]

Preset for the color Grey

guipy.utils.DARK_GREY = [100, 100, 100]

Preset for the color Dark Grey

guipy.utils.ORANGE = [255, 100, 0]

Preset for the color Orange

guipy.utils.TRANSPARENT = [0, 0, 0, 0]

Preset for transparent (for alpha surfaces)