Rechercher une page de manuel
Clutter::Units.3pm
Langue: en
Version: 2008-07-23 (debian - 07/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
Clutter::UnitsDESCRIPTION
Clutter uses device independent units, internally, to provide sub-pixel positioning and sizing. While the public API does not always expose this for convenience of the developer, when writing new Clutter::Actor classes you will be exposed to this kind of units.The following package methods are useful for converting device dependent units, like pixels and percentages, into device independent units and vice versa.
METHODS
units = Clutter::Units->FROM_DEVICE ($value)
-
- •
- $value (integer)
Converts pixels into device independent units
units = Clutter::Units->FROM_FLOAT ($value)
-
- •
- $value (double)
Converts a floating point value, like a percentage, into a device independent unit
units = Clutter::Units->FROM_INT ($value)
-
- •
- $value (integer)
Converts an integer value, like pixels, into a device independent unit.
units = Clutter::Units->FROM_MM ($millimeters)
-
- •
- $millimeters (integer)
Converts millimeters into device independent units
units = Clutter::Units->FROM_PANGO_UNIT ($value)
-
- •
- $value (integer)
Converts Pango units into device independent units
units = Clutter::Units->FROM_PARENT_HEIGHT_PERCENTAGE ($actor, $percent)
units = Clutter::Units->FROM_PARENT_HEIGHT_PERCENTAGE ($actor, $percent)
-
- •
- $actor (Clutter::Actor)
- •
- $percent (integer)
Converts a percentage of an actor's parent widget height into device independed units
units = Clutter::Units->FROM_PARENT_WIDTH_PERCENTAGE ($actor, $percent)
units = Clutter::Units->FROM_PARENT_WIDTH_PERCENTAGE ($actor, $percent)
-
- •
- $actor (Clutter::Actor)
- •
- $percent (integer)
Converts a percentage of an actor's parent widget width into device independed units
units = Clutter::Units->FROM_POINTS ($points)
-
- •
- $points (integer)
Converts font points into device independent units
units = Clutter::Units->FROM_STAGE_HEIGHT_PERCENTAGE ($percent)
-
- •
- $percent (integer)
Converts a percentage of the default stage's height into device independed units
units = Clutter::Units->FROM_STAGE_WIDTH_PERCENTAGE ($percent)
-
- •
- $percent (integer)
Converts a percentage of the default stage's width into device independed units
units = Clutter::Units->MAX_UNIT
- Maximum value for units
units = Clutter::Units->MIN_UNIT
- Minimum value for units
integer = Clutter::Units->TO_DEVICE ($units)
-
- •
- $units (integer) High precision units
Converts device independent units into pixels
double = Clutter::Units->TO_FLOAT ($units)
-
- •
- $units (integer) High precision units
Converts a device independent unit into a floating point value, like a percentage
integer = Clutter::Units->TO_INT ($units)
-
- •
- $units (integer) High precision units
Converts a device independent unit into an integer value, like pixels.
integer = Clutter::Units->TO_PANGO_UNIT ($units)
-
- •
- $units (units)
Converts device independent units into Pango units
SEE ALSO
ClutterCOPYRIGHT
Copyright (C) 2006 OpenedHand Ltd.This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Library version 2.1, or under the terms of the Artistic License. See Clutter for the full copyright notice.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre