v_sim.SurfaceResource

g GObject.Object GObject.Object v_sim.SurfaceResource v_sim.SurfaceResource GObject.Object->v_sim.SurfaceResource

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new_fromCopy (surf_name, orig)

class

new_fromName (surf_name, new_surf)

getColor ()

getLabel ()

getMaskable ()

getMaterial ()

getRendered ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

color

v_sim.Color

r/w

rendering color

label

str

r/w/co

label of the resource

maskable

bool

r/w

masked or not

material

r/w

rendering material

rendered

bool

r/w

rendered or not

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.SurfaceResourcePrivate

r

Class Details

class v_sim.SurfaceResource(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.SurfaceResourceClass

This structure defines some drawing properties of a set of v_sim.Surface.

classmethod new_fromCopy(surf_name, orig)
Parameters:
Returns:

a newly created v_sim.SurfaceResource object.

Return type:

v_sim.SurfaceResource

Copy constructor of v_sim.SurfaceResource objects.

New in version 3.8.

classmethod new_fromName(surf_name, new_surf)
Parameters:
  • surf_name (str) – the name of the surface (can be None) ;

  • new_surf (bool) – a location to store a boolean value (can be None).

Returns:

the resource (created or retrieved).

Return type:

v_sim.SurfaceResource

This returns the resource information matching the given surf_name. If the resource doesn’t exist, it is created and new is set to True. If the given name (surf_name) is None, then a new resource is created, but it is not stored and will not be shared by surfaces.

getColor()
Returns:

a color.

Return type:

v_sim.Color

Retrieves the color of self.

New in version 3.8.

getLabel()
Returns:

a string.

Return type:

str

Retrieves the label of self.

New in version 3.8.

getMaskable()
Returns:

a boolean.

Return type:

bool

Retrieves if self is sensitive to masking properties.

New in version 3.8.

getMaterial()
Returns:

a material.

Return type:

float

Retrieves the material of self.

New in version 3.8.

getRendered()
Returns:

a boolean.

Return type:

bool

Retrieves wether self is drawn or not.

New in version 3.8.

Property Details

v_sim.SurfaceResource.props.color
Name:

color

Type:

v_sim.Color

Default Value:

None

Flags:

READABLE, WRITABLE

rendering color

v_sim.SurfaceResource.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

label of the resource

v_sim.SurfaceResource.props.maskable
Name:

maskable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

masked or not

v_sim.SurfaceResource.props.material
Name:

material

Type:

Default Value:

None

Flags:

READABLE, WRITABLE

rendering material

v_sim.SurfaceResource.props.rendered
Name:

rendered

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

rendered or not