Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
Graphic2d_ViewMapping Class Reference

A ViewMapping defines a square region of the model
space from an origin point and a size in meters.
This square region is called the "map from".

#include <Graphic2d_ViewMapping.hxx>

Inheritance diagram for Graphic2d_ViewMapping:
Inheritance graph
[legend]

Public Member Functions

 Graphic2d_ViewMapping ()
 Creates a view mapping with the following default
values :
XCenter = 0.
YCenter = 0.
Size = 1.

void SetViewMapping (const Quantity_Length aXCenter, const Quantity_Length aYCenter, const Quantity_Length aSize)
 Sets new values for the view mapping <me>.

void SetCenter (const Quantity_Length aXCenter, const Quantity_Length aYCenter)
 Sets new values for the view mapping center.

void SetSize (const Quantity_Length aSize)
 Sets new value for the view mapping size.

void SetViewMappingDefault ()
 Saves the current mapping which will be the
reference value for the reset of the mapping
done by the ViewmappingReset method.

void ViewMappingReset ()
 Sets the value of the mapping to be the same as
the mapping saved by the SetViewMappingDefault method.

void ViewMapping (Quantity_Length &XCenter, Quantity_Length &YCenter, Quantity_Length &Size) const
 Returns the current mapping of the view <me>.

void Center (Quantity_Length &XCenter, Quantity_Length &YCenter) const
 Returns the current center of the view <me>.

void ViewMappingDefault (Quantity_Length &XCenter, Quantity_Length &YCenter, Quantity_Length &Size) const
 Returns the current reset mapping of the view <me>.

Quantity_Factor Zoom () const
 Returns the zoom factor (CurrentSize/InitialSize).


Constructor & Destructor Documentation


Member Function Documentation

void Graphic2d_ViewMapping::Center ( Quantity_Length XCenter,
Quantity_Length YCenter 
) const

The documentation for this class was generated from the following file: