Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: awt ::

interface XUnitConversion
Description
allows converting between different measurement units
Since
OOo 3.0

Methods' Summary
convertPointToLogic converts the given Point, which is specified in pixels, into the given logical unit  
convertPointToPixel converts the given Point, which is specified in the given logical unit, into pixels  
convertSizeToLogic converts the given Size, which is specified in pixels, into the given logical unit  
convertSizeToPixel converts the given Size, which is specified in the given logical unit, into pixels  
Methods' Details
convertPointToLogic
Point
convertPointToLogic( [in] Point  Point,
[in] short  TargetUnit )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
converts the given Point, which is specified in pixels, into the given logical unit
Parameter Point
A given Point in a well known type
Parameter TargetUnit
A type from ::com::sun::star::util::MeasureUnit in which the Point will convert to.
Returns
Returns a new Point in the TargetUnit type format.
convertPointToPixel
Point
convertPointToPixel( [in] Point  aPoint,
[in] short  SourceUnit )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
converts the given Point, which is specified in the given logical unit, into pixels
Parameter Point
A given Point in the SourceUnit type
Parameter SourceUnit
The type from ::com::sun::star::util::MeasureUnit of the Point.
Returns
Return a new Point in Pixel type format.
convertSizeToLogic
Size
convertSizeToLogic( [in] Size  aSize,
[in] short  TargetUnit )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
converts the given Size, which is specified in pixels, into the given logical unit
Parameter aSize
A given Size in a well known type
Parameter TargetUnit
A type from ::com::sun::star::util::MeasureUnit in which the Size will convert to.
Returns
Returns a new Size in the TargetUnit type format.
convertSizeToPixel
Size
convertSizeToPixel( [in] Size  aSize,
[in] short  SourceUnit )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
converts the given Size, which is specified in the given logical unit, into pixels
Parameter Size
A given Size in a well known type
Parameter TargetUnit
The type from ::com::sun::star::util::MeasureUnit of the Size.
Returns
Returns a new Size in the TargetUnit type format.
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.