stalker.models.format.ImageFormat¶
-
class
stalker.models.format.ImageFormat(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)[source]¶ Bases:
stalker.models.entity.EntityCommon image formats for the
Projects.Parameters: - width – The width of the format, it cannot be zero or negative, if a float number is given it will be converted to integer
- height – The height of the format, it cannot be zero or negative, if a float number is given it will be converted to integer
- pixel_aspect – The pixel aspect ratio of the current ImageFormat object, it cannot be zero or negative, and if given as an integer it will be converted to a float, the default value is 1.0
- print_resolution – The print resolution of the ImageFormat given as DPI (dot-per-inch). It cannot be zero or negative
-
__init__(width=None, height=None, pixel_aspect=1.0, print_resolution=300, **kwargs)¶
Methods
__init__([width, height, pixel_aspect, …])Attributes
created_byThe Userwho has created this object.created_by_idThe id of the Userwho has created this entity.date_createdA datetime.datetimeinstance showing the creation date and time of this object.date_updatedA datetime.datetimeinstance showing the update date and time of this object.descriptionDescription of this object. device_aspectreturns the device aspect entity_groupsentity_identity_typegeneric_dataThis attribute can hold any kind of data which exists in SOM. generic_textThis attribute can hold any text. heightThe height of this format html_classhtml_styleidimageFormat_idmetadatanameName of this object nice_nameNice name of this object. notesAll the Notess attached to this entity.pixel_aspectThe pixel aspect ratio of this format. plural_class_namethe plural name of this class print_resolutionThe print resolution of this format querytagsA list of tags attached to this object. thumbnailthumbnail_idtjp_idreturns TaskJuggler compatible id to_tjprenders a TaskJuggler compliant string used for TaskJuggler typeThe type of the object. type_idThe id of the Typeof this entity.updated_byThe Userwho has updated this object.updated_by_idThe id of the Userwho has updated this entity.widthThe width of this format. -
width¶ The width of this format.
- the width should be set to a positive non-zero integer
- integers are also accepted but will be converted to float
- for improper inputs the object will raise an exception.
-
height¶ The height of this format
- the height should be set to a positive non-zero integer
- integers are also accepted but will be converted to float
- for improper inputs the object will raise an exception.
-
pixel_aspect¶ The pixel aspect ratio of this format.
- the pixel_aspect should be set to a positive non-zero float
- integers are also accepted but will be converted to float
- for improper inputs the object will raise an exception
-
print_resolution¶ The print resolution of this format
- it should be set to a positive non-zero float or integer
- integers are also accepted but will be converted to float
- for improper inputs the object will raise an exception.
-
date_created¶ A
datetime.datetimeinstance showing the creation date and time of this object.
-
date_updated¶ A
datetime.datetimeinstance showing the update date and time of this object.
-
description¶ Description of this object.
-
generic_data¶ This attribute can hold any kind of data which exists in SOM.
-
generic_text¶ This attribute can hold any text.
-
name¶ Name of this object
-
nice_name¶ Nice name of this object.
It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.
-
notes¶ All the
Notess attached to this entity.It is a list of
Noteinstances or an empty list, setting it to None will raise a TypeError.
-
plural_class_name¶ the plural name of this class
A list of tags attached to this object.
It is a list of
Taginstances which shows the tags of this object
-
tjp_id¶ returns TaskJuggler compatible id
-
to_tjp¶ renders a TaskJuggler compliant string used for TaskJuggler integration. Needs to be overridden in inherited classes.
-
type¶ The type of the object.
It is a
Typeinstance with a properType.target_entity_type.
-
type_id¶ The id of the
Typeof this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.
-
device_aspect¶ returns the device aspect
because the device_aspect is calculated from the width/height*pixel formula, this property is read-only.