CODRuler Class
class CODRuler: public IODRuler
A ruler object measures logical units in an MvcLogicalPart.Defined in: OdRuler.h
Class Members
CODRuler(sfl::MvcLogicalPart* pLogPart)
Constructor.
virtual ~CODRuler()
Destructor.
virtual OD_UNIT_OF_MEASURE GetUnitOfMeasure() const
Gets the current unit of measure.
virtual void SetUnitOfMeasure(const OD_UNIT_OF_MEASURE units)
Sets the current unit of measure.
virtual void GetLogicalUnitMeasure(CODMeasure& logXUnit, CODMeasure& logYUnit)
Gets the size of one logical unit on the output device.
virtual void SetLogicalUnitMeasure(const CODMeasure& logXUnit, const CODMeasure& logYUnit)
Sets the size of one logical unit on the output device.
virtual void GetMeasurementScale(CODMeasure& scaleFrom, CODMeasure& scaleTo)
Gets scaling factor for measurements.
virtual void SetMeasurementScale(const CODMeasure& scaleFrom, const CODMeasure& scaleTo)
Sets a scaling factor for measurements.
virtual float GetScaleRatio() const
Returns the ratio used to scale measurements.
virtual void MeasureToLog(const CODMeasure& measure, float& fLog, const BOOL bVertical = TRUE)
Converts from real measurement to logical units.
virtual void LogToMeasure(const float& fLog, CODMeasure& measure, const BOOL bVertical = TRUE)
Converts from logical units to real measurement.
virtual void MeasureSize(CODComponent* pComp, CODMeasure& width, CODMeasure& height)
Measure the width and height of a component.
virtual void MeasurePosition(CODComponent* pComp, CODMeasure& x, CODMeasure& y, const OD_CONTROL_POINT nControlPoint = OD_TOP_LEFT)
Measure the position of a component.
sfl::MvcLogicalPart* m_pLogPart
Pointer to logical part measured by this ruler.
OD_UNIT_OF_MEASURE m_units
Unit of measurement for the ruler.
CODMeasure m_measureScaleFrom
Denominator in measurement scaling ratio.
CODMeasure m_measureScaleTo
Numerator in measurement scaling ratio.
float m_fMeasureScaleRatio
Ratio used to scale measurements.