# Visualization
TKV2d
Graphic2d

# 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>`

## Public Member Functions

Standard_EXPORT | Graphic2d_ViewMapping ()
| Creates a view mapping with the following default values : XCenter = 0. YCenter = 0. Size = 1. .
Standard_EXPORT void | SetViewMapping (const Quantity_Length aXCenter, const Quantity_Length aYCenter, const Quantity_Length aSize)
| Sets new values for the view mapping <me>. .
Standard_EXPORT void | SetCenter (const Quantity_Length aXCenter, const Quantity_Length aYCenter)
| Sets new values for the view mapping center. .
Standard_EXPORT void | SetSize (const Quantity_Length aSize)
| Sets new value for the view mapping size. .
Standard_EXPORT void | SetViewMappingDefault ()
| Saves the current mapping which will be the reference value for the reset of the mapping done by the ViewmappingReset method. .
Standard_EXPORT void | ViewMappingReset ()
| Sets the value of the mapping to be the same as the mapping saved by the SetViewMappingDefault method. .
Standard_EXPORT void | ViewMapping (Quantity_Length &XCenter, Quantity_Length &YCenter, Quantity_Length &Size) const
| Returns the current mapping of the view <me>. .
Standard_EXPORT void | Center (Quantity_Length &XCenter, Quantity_Length &YCenter) const
| Returns the current center of the view <me>. .
Standard_EXPORT void | ViewMappingDefault (Quantity_Length &XCenter, Quantity_Length &YCenter, Quantity_Length &Size) const
| Returns the current reset mapping of the view <me>. .
Standard_EXPORT Quantity_Factor | Zoom () const
| Returns the zoom factor (CurrentSize/InitialSize). .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Attributes

Quantity_Length | myXCenter
Quantity_Length | myYCenter
Quantity_Length | mySize
Quantity_Length | myInitialXCenter
Quantity_Length | myInitialYCenter
Quantity_Length | myInitialSize

## Constructor & Destructor Documentation

Standard_EXPORT Graphic2d_ViewMapping::Graphic2d_ViewMapping | ( |  | ) |

## Member Function Documentation

Standard_EXPORT void Graphic2d_ViewMapping::Center | ( | Quantity_Length & | XCenter,
|  | Quantity_Length & | YCenter
| ) | const

Standard_EXPORT const Graphic2d_ViewMapping::Handle | ( | Standard_Type |  | ) | const

Standard_EXPORT void Graphic2d_ViewMapping::SetCenter | ( | const Quantity_Length | aXCenter,
|  | const Quantity_Length | aYCenter
| ) |

Standard_EXPORT void Graphic2d_ViewMapping::SetSize | ( | const Quantity_Length | aSize | ) |

Standard_EXPORT void Graphic2d_ViewMapping::SetViewMapping | ( | const Quantity_Length | aXCenter,
|  | const Quantity_Length | aYCenter,
|  | const Quantity_Length | aSize
| ) |

Standard_EXPORT void Graphic2d_ViewMapping::SetViewMappingDefault | ( |  | ) |

Standard_EXPORT void Graphic2d_ViewMapping::ViewMapping | ( | Quantity_Length & | XCenter,
|  | Quantity_Length & | YCenter,
|  | Quantity_Length & | Size
| ) | const

Standard_EXPORT void Graphic2d_ViewMapping::ViewMappingDefault | ( | Quantity_Length & | XCenter,
|  | Quantity_Length & | YCenter,
|  | Quantity_Length & | Size
| ) | const

Standard_EXPORT void Graphic2d_ViewMapping::ViewMappingReset | ( |  | ) |

Standard_EXPORT Quantity_Factor Graphic2d_ViewMapping::Zoom | ( |  | ) | const

## Field Documentation

Quantity_Length Graphic2d_ViewMapping::myInitialSize `[private]`

Quantity_Length Graphic2d_ViewMapping::myInitialXCenter `[private]`

Quantity_Length Graphic2d_ViewMapping::myInitialYCenter `[private]`

Quantity_Length Graphic2d_ViewMapping::mySize `[private]`

Quantity_Length Graphic2d_ViewMapping::myXCenter `[private]`

Quantity_Length Graphic2d_ViewMapping::myYCenter `[private]`

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

- Graphic2d_ViewMapping.hxx