Rechercher une page de manuel
Clutter::Units.3pm
Langue: en
Version: 2008-02-20 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
NAME
Clutter::UnitsDESCRIPTION
Clutter uses device independent units, internally, to provide sub-pixel positioning. While the public API does not always expose this for convenience of the developer, when writing new Clutter::Actor classes or when implementing low-level interfaces like Clutter::Layout 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.
Note: this is true for Clutter 0.4. In Clutter 0.6 (and relative Perl bindings) the public API will always return device independent units as well, and will be care of the developer to convert it to device units, like pixels, font units, etc.
METHODS
integer = Clutter::Units->FROM_DEVICE ($value)
-
- •
- $value (integer)
Converts pixels into device independent units
integer = Clutter::Units->FROM_FLOAT ($value)
-
- •
- $value (double)
Converts a floating point value, like a percentage, into a device independent unit
integer = Clutter::Units->FROM_INT ($value)
-
- •
- $value (integer)
Converts an integer value, like pixels, into a device independent unit.
integer = Clutter::Units->FROM_MM ($millimeters)
-
- •
- $millimeters (integer)
Converts millimeters into device independent units
integer = Clutter::Units->FROM_PANGO_UNIT ($value)
-
- •
- $value (integer)
Converts Pango units into device independent units
integer = Clutter::Units->FROM_PARENT_HEIGHT_PERCENTAGE ($actor, $percent)
integer = 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
integer = Clutter::Units->FROM_PARENT_WIDTH_PERCENTAGE ($actor, $percent)
integer = 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
integer = Clutter::Units->FROM_POINTS ($points)
-
- •
- $points (integer)
Converts font points into device independent units
integer = Clutter::Units->FROM_STAGE_HEIGHT_PERCENTAGE ($percent)
-
- •
- $percent (integer)
Converts a percentage of the default stage's height into device independed units
integer = Clutter::Units->FROM_STAGE_WIDTH_PERCENTAGE ($percent)
-
- •
- $percent (integer)
Converts a percentage of the default stage's width into device independed 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 (integer)
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