Package motherhamster :: Module imageassets :: Class ImageAsset

Class ImageAsset



            object --+    
                     |    
cheekpouches.AssetBase --+
                         |
                        ImageAsset

a python object representation of an image asset it represents both the raw image data and the metadata it can produce pygame surfaces for use in rendering

Instance Methods
 
hotspotx_type(...)
the class for an editable number that can take a range of values
 
hotspoty_type(...)
the class for an editable number that can take a range of values
 
hotspot_offset(...)
the class for an editable 2d vector
 
blend_mode(...)
the class for an editable number that can take a range of values
 
joints(...)
a reflected list of reflected somethings
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__del__(self)
 
get_hotspot_base(self)
 
calculate_hotspot(self)
 
get_joint_offset(self, joint_name)
 
compute_joint_pos(self, joint_name, pos, angle)
 
asset_editor_image(self)
Returns an image representation of the asset as a pygame surface
 
asset_set_property(self, key, value)
A function the editor calls to change a property the editor should never edit an asset any other way

Inherited from cheekpouches.AssetBase: __getinitargs__, __reduce__, asset_get_properties, asset_is_writable, asset_lose_monitor, asset_monitor_changes, asset_report_property_change, asset_save, asset_set_path

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables
  x_origins = Enum("left", "center", "right")
  y_origins = Enum("top", "center", "bottom")
  blend_modes = Enum("alpha_blend", "additive", "lighting")
Properties
  hotspot
gets the hotspot for the image
  size
gets the default pixel size of the image for the asset
  width
gets the default pixel width of the image for the asset
  height
gets the default pixel height of the image for the asset
  surface
gets the pygame surface for this image

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: cheekpouches.AssetBase.__init__

asset_editor_image(self)

 
Returns an image representation of the asset as a pygame surface
Overrides: cheekpouches.AssetBase.asset_editor_image
(inherited documentation)

asset_set_property(self, key, value)

 
A function the editor calls to change a property the editor should never edit an asset any other way
Overrides: cheekpouches.AssetBase.asset_set_property
(inherited documentation)

Property Details

hotspot

gets the hotspot for the image
Get Method:
motherhamster.imageassets.ImageAsset._get_hotspot(self)

size

gets the default pixel size of the image for the asset
Get Method:
motherhamster.imageassets.ImageAsset._get_size(self)

width

gets the default pixel width of the image for the asset
Get Method:
motherhamster.imageassets.ImageAsset._get_width(self)

height

gets the default pixel height of the image for the asset
Get Method:
motherhamster.imageassets.ImageAsset._get_height(self)

surface

gets the pygame surface for this image
Get Method:
motherhamster.imageassets.ImageAsset.__get_surface(self)