rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvTimeScalePaintContext Class Reference

Utility class for IlvTimeScale. More...

#include <ilviews/graphics/timescale.h>

List of all members.

Public Member Functions

 IlvTimeScalePaintContext (const IlvTimeScalePaintContext &)
 Copy constructor.
 IlvTimeScalePaintContext (const IlvTimeScale *tscale)
 Constructor.
 IlvTimeScalePaintContext (IlDate visibleTime, IlvDuration duration, IlDouble XTranslation=0.0, IlDouble XZoomFactor=1.0, IlvFont *font=0)
 Constructor.
IlvFontgetFont () const
 Gets the font used to paint the labels of the time scale.
IlvDuration getVisibleDuration () const
 Returns the duration of the time interval painted by the scale.
IlDate getVisibleTime () const
 Returns the beginning of the time interval displayed by the scale.
IlDouble getXTranslation () const
 Returns the horizontal translation used while painting the time scale.
IlDouble getXZoomFactor () const
 Returns the horizontal zoom factor used while painting the time scale.
IlDouble inverseTransform (IlDouble x) const
 Inverse transforms a horizontal coordinate.
void setFont (IlvFont *font)
 Sets the font used to paint the labels of the time scale.
void setVisibleDuration (IlvDuration duration)
 Sets the duration of the time interval painted by the scale.
void setVisibleTime (IlDate time)
 Sets the beginning of the time interval painted by the scale.
void setXTranslation (IlDouble translation)
 Sets the horizontal translation used while painting the time scale.
void setXZoomFactor (IlDouble factor)
 Sets the horizontal zoom factor used while painting the time scale.
IlDouble transform (IlDouble x) const
 Transforms a horizontal coordinate.

Detailed Description

Utility class for IlvTimeScale.

Library: views

A IlvTimeScalePaintContext defines the context in which the time scale paints.

It defines the following parameters required for painting the time scale:

The IlvTimeScalePaintContext is generally used by the method IlvTimeScale::draw(). The time scale has a cached IlvTimeScalePaintContext that can be retrieved by calling IlvTimeScale::getPaintContext. It is the paint context used to paint the time scale when the IlvTimeScale::draw method is called.

See also:
IlvTimeScale::getPaintContext
IlvTimeScale::draw

Constructor & Destructor Documentation

IlvTimeScalePaintContext::IlvTimeScalePaintContext ( IlDate  visibleTime,
IlvDuration  duration,
IlDouble  XTranslation = 0.0,
IlDouble  XZoomFactor = 1.0,
IlvFont font = 0 
)

Constructor.

Initializes a new IlvTimeScalePaintContext for the specified visible interval, the transformation, the zoom factor, and the font.

Parameters:
visibleTime The begin of the visible time interval to be painted.
duration The duration of the visible time interval to be painted.
XTranslation The horizontal translation used to paint the time scale.
XZoomFactor The horizontal zoom factor used to paint the time scale.
font The font used to paint the labels of the time scale.
IlvTimeScalePaintContext::IlvTimeScalePaintContext ( const IlvTimeScale tscale  ) 

Constructor.

Creates a new IlvTimeScalePaintContext by copying parameters (duration, zoom factor and horizontal translation) from an existing IlvTimeScale.

Parameters:
tscale The existing time scale to copy from.

Member Function Documentation

IlvFont* IlvTimeScalePaintContext::getFont (  )  const

Gets the font used to paint the labels of the time scale.

Returns:
The font.
See also:
setFont
IlvDuration IlvTimeScalePaintContext::getVisibleDuration (  )  const

Returns the duration of the time interval painted by the scale.

See also:
setVisibleDuration
IlDate IlvTimeScalePaintContext::getVisibleTime (  )  const

Returns the beginning of the time interval displayed by the scale.

See also:
setVisibleTime
IlDouble IlvTimeScalePaintContext::getXTranslation (  )  const

Returns the horizontal translation used while painting the time scale.

Returns:
The horizontal translation.
See also:
transform
inverseTransform
IlDouble IlvTimeScalePaintContext::getXZoomFactor (  )  const

Returns the horizontal zoom factor used while painting the time scale.

Returns:
The horizontal zoom factor.
See also:
transform
inverseTransform
IlDouble IlvTimeScalePaintContext::inverseTransform ( IlDouble  x  )  const

Inverse transforms a horizontal coordinate.

The value is transformed as follows:

(x - XTranslation) / XZoomFactor

Parameters:
x The coordinate to be inverse transformed.
Returns:
The transformed coordinate.
See also:
setXTranslation
getXTranslation
setXZoomFactor
getXZoomFactor
transform
void IlvTimeScalePaintContext::setFont ( IlvFont font  ) 

Sets the font used to paint the labels of the time scale.

This parameter can be 0. In this case the font parameter in the context is ignored. The fonts defined for the time scale rows are used instead.

Parameters:
font The font.
void IlvTimeScalePaintContext::setVisibleDuration ( IlvDuration  duration  ) 

Sets the duration of the time interval painted by the scale.

Parameters:
duration The new duration value.
See also:
getVisibleDuration
void IlvTimeScalePaintContext::setVisibleTime ( IlDate  time  ) 

Sets the beginning of the time interval painted by the scale.

This function adjusts the horizontal translation so that the specified date appears at the beginning of the painted time scale.

Parameters:
time The new time value.
See also:
getVisibleTime
void IlvTimeScalePaintContext::setXTranslation ( IlDouble  translation  ) 

Sets the horizontal translation used while painting the time scale.

Parameters:
translation The new horizontal translation.
See also:
transform
inverseTransform
void IlvTimeScalePaintContext::setXZoomFactor ( IlDouble  factor  ) 

Sets the horizontal zoom factor used while painting the time scale.

Parameters:
factor The new horizontal zoom factor, which cannot be 0.0.
See also:
transform
inverseTransform
IlDouble IlvTimeScalePaintContext::transform ( IlDouble  x  )  const

Transforms a horizontal coordinate.

The value is transformed as follows:

x * XZoomFactor + XTranslation

Parameters:
x The coordinate to be transformed.
Returns:
The transformed coordinate.
See also:
setXTranslation
getXTranslation
setXZoomFactor
getXZoomFactor
inverseTransform
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.