C# Class Smrf.NodeXL.Visualization.Wpf.NodeXLControl.GraphImageCenterer

Centers a graph image for the NodeXLControl and later restores the original graph location.
This prepares the NodeXLControl for being saved as an image. It adjusts the control's transforms so that the image will be centered on the same point on the graph that the control is centered on. This prevents an unwanted graph shift when the image has dimensions different from those of the control.

Because the NodeXLControl's transforms are not public, this class is embedded within the control.

Pass an image size to CenterGraphImage, which immediately centers the graph within the image dimensions. Call to restore the graph to its original location.

Inheritance: Object
Afficher le fichier Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Свойство Type Description
m_dOriginalScaleTransformForRenderCenterX Double
m_dOriginalScaleTransformForRenderCenterY Double
m_dOriginalTranslateTransformForRenderX Double
m_dOriginalTranslateTransformForRenderY Double
m_oNodeXLControl NodeXLControl

Méthodes publiques

Méthode Description
CenterGraphImage ( Size imageSize ) : void
GraphImageCenterer ( NodeXLControl nodeXLControl ) : System

Initializes a new instance of the GraphImageCenterer class.

RestoreCenter ( ) : void

Private Methods

Méthode Description
AssertValid ( ) : void

Method Details

CenterGraphImage() public méthode

public CenterGraphImage ( Size imageSize ) : void
imageSize System.Windows.Size
Résultat void

GraphImageCenterer() public méthode

Initializes a new instance of the GraphImageCenterer class.
public GraphImageCenterer ( NodeXLControl nodeXLControl ) : System
nodeXLControl NodeXLControl /// The control for which a graph image will be created. ///
Résultat System

RestoreCenter() public méthode

public RestoreCenter ( ) : void
Résultat void

Property Details

m_dOriginalScaleTransformForRenderCenterX protected_oe property

protected Double m_dOriginalScaleTransformForRenderCenterX
Résultat Double

m_dOriginalScaleTransformForRenderCenterY protected_oe property

protected Double m_dOriginalScaleTransformForRenderCenterY
Résultat Double

m_dOriginalTranslateTransformForRenderX protected_oe property

protected Double m_dOriginalTranslateTransformForRenderX
Résultat Double

m_dOriginalTranslateTransformForRenderY protected_oe property

protected Double m_dOriginalTranslateTransformForRenderY
Résultat Double

m_oNodeXLControl protected_oe property

protected NodeXLControl,Smrf.NodeXL.Visualization.Wpf m_oNodeXLControl
Résultat NodeXLControl