C# Class Smrf.NodeXL.Visualization.Wpf.GraphImageScaler

Sets the graph scale on a NodeXLControl and later restores the original graph scale.
This prepares the NodeXLControl for being saved as an image. It adjusts the control's graph scale so that the graph's vertices and edges will be the same relative size in the image that they are in the control.

Call SetGraphScale before saving the image, then call to restore the original graph scale.

Inheritance: Object
Mostrar archivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_dOriginalGraphScale Double
m_dOriginalGroupLabelScale Double
m_oNodeXLControl NodeXLControl

Public Methods

Method Description
GraphImageScaler ( NodeXLControl nodeXLControl ) : System

Initializes a new instance of the GraphImageScaler class.

RestoreGraphScale ( ) : void
SetGraphScale ( Int32 bitmapWidthPx, Int32 bitmapHeightPx, Double screenDpi ) : void

Protected Methods

Method Description
PinScale ( Double dScale ) : Double

Private Methods

Method Description
AssertValid ( ) : void

Method Details

GraphImageScaler() public method

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

PinScale() protected method

protected PinScale ( Double dScale ) : Double
dScale Double
return Double

RestoreGraphScale() public method

public RestoreGraphScale ( ) : void
return void

SetGraphScale() public method

public SetGraphScale ( Int32 bitmapWidthPx, Int32 bitmapHeightPx, Double screenDpi ) : void
bitmapWidthPx System.Int32
bitmapHeightPx System.Int32
screenDpi Double
return void

Property Details

m_dOriginalGraphScale protected_oe property

protected Double m_dOriginalGraphScale
return Double

m_dOriginalGroupLabelScale protected_oe property

protected Double m_dOriginalGroupLabelScale
return Double

m_oNodeXLControl protected_oe property

protected NodeXLControl,Smrf.NodeXL.Visualization.Wpf m_oNodeXLControl
return NodeXLControl