struct CCL::IScale
Overview
#include <iscale.h> struct IScale: public CCL::IUnknown { // typedefs typedef int Unit; // methods virtual Coord unitToPixel (Unit value) const = 0; virtual Unit pixelToUnit (Coord position) const = 0; virtual void getExtent ( Unit start, Unit end, Coord& startCoord, Coord& endCoord ) const = 0; virtual Unit getNumUnits () const = 0; virtual bool isReversed () const = 0; virtual IFormatter* createFormatter () const = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Typedefs
typedef int Unit
Data unit type (fixed-point!).
Methods
virtual Coord unitToPixel (Unit value) const = 0
Convert from data unit to pixel position.
virtual Unit pixelToUnit (Coord position) const = 0
Convert pixel position to data unit.
virtual void getExtent ( Unit start, Unit end, Coord& startCoord, Coord& endCoord ) const = 0
Get pixel extent from data units.
virtual Unit getNumUnits () const = 0
Get number of total data units.
virtual bool isReversed () const = 0
Check if scale is reversed (unit counting from max down to zero).
virtual IFormatter* createFormatter () const = 0
Create a formatter for values of this scale (optional).