C# Class System.Drawing.PieChart.PieChart3D

Object representing a pie chart.
Inheritance: IDisposable
Afficher le fichier Open project: Longkong/Pojjaman Class Usage Examples

Protected Properties

Свойство Type Description
m_edgeColorType EdgeColorType
m_edgeLineWidth float
m_fitToBoundingRectangle bool
m_font System.Drawing.Font
m_foreColor Color
m_heightBoundingRect float
m_highlightedIndex int
m_initialAngle float
m_pieSlices System.Drawing.PieChart.PieSlice[]
m_pieSlicesMapping System.Collections.ArrayList
m_shadowStyle ShadowStyle
m_sliceColors Color[]
m_sliceRelativeDisplacements float[]
m_sliceRelativeHeight float
m_texts string[]
m_values decimal[]
m_widthBoundingRect float
m_xBoundingRect float
m_yBoundingRect float

Méthodes publiques

Méthode Description
Dispose ( ) : void

Disposes of all pie slices.

Draw ( Graphics graphics ) : void

Draws the chart.

FindPieSliceUnderPoint ( PointF point ) : int

Searches the chart to find the index of the pie slice which contains point given. Search order goes in the direction opposite to drawing order.

PieChart3D ( RectangleF boundingRectangle, decimal values, Color sliceColors, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and corresponding colors.

PieChart3D ( RectangleF boundingRectangle, decimal values, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and pie slice thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values ) : System

Initializes an instance of a flat PieChart3D with specified bounds, values to chart and relative thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight, string texts ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight ) : System

Initializes an instance of PieChart3D with specified bounds, values to chart and relative thickness.

PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight, string texts ) : System

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.

PlaceTexts ( Graphics graphics ) : void

Draws strings by individual slices. Position of the text is calculated by overridable GetTextPosition method of the PieSlice type.

Méthodes protégées

Méthode Description
CreatePieSlice ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice

Creates a PieSlice object.

CreatePieSliceHighlighted ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice

Creates highlighted PieSlice object.

DrawBottoms ( Graphics graphics ) : void

Draws bottom sides of all pie slices.

DrawSliceSides ( Graphics graphics ) : void

Draws outer peripheries of all slices.

DrawTops ( Graphics graphics ) : void

Draws top sides of all pie slices.

GetFittingRectangle ( ) : RectangleF

Finds the smallest rectangle int which chart fits entirely.

GetSliceDisplacement ( float angle, float displacementFactor ) : SizeF

Calculates the displacement for given angle.

InitializePieSlices ( ) : void

Initializes pies.

PieChart3D ( ) : System

Initializes an empty instance of PieChart3D.

ReadjustSlices ( RectangleF newBoundingRectangle ) : void

Readjusts each slice for new bounding rectangle.

Private Methods

Méthode Description
AreDisplacementsValid ( float displacements ) : bool

Helper function used in assertions. Checks the validity of slice displacements.

GetForemostPieSlice ( PieSlice pieSlices ) : int

Return the index of the foremost pie slice i.e. the one crossing 90 degrees boundary.

IsDisplacementValid ( float value ) : bool

Helper function used in assertions. Checks the validity of a slice displacement.

Method Details

CreatePieSlice() protected méthode

Creates a PieSlice object.
protected CreatePieSlice ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice
boundingRectLeft float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectTop float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectWidth float /// Width of the rectangle that is used to draw the top surface of /// the slice. ///
boundingRectHeight float /// Height of the rectangle that is used to draw the top surface of /// the slice. ///
sliceHeight float /// Slice height. ///
startAngle float /// Starting angle. ///
sweepAngle float /// Sweep angle. ///
color Color /// Color used for slice rendering. ///
shadowStyle ShadowStyle /// Shadow style used for slice rendering. ///
edgeColorType EdgeColorType /// Edge lines color type. ///
edgeLineWidth float /// Edge lines width. ///
Résultat PieSlice

CreatePieSliceHighlighted() protected méthode

Creates highlighted PieSlice object.
protected CreatePieSliceHighlighted ( float boundingRectLeft, float boundingRectTop, float boundingRectWidth, float boundingRectHeight, float sliceHeight, float startAngle, float sweepAngle, Color color, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : PieSlice
boundingRectLeft float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectTop float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the slice. ///
boundingRectWidth float /// Width of the rectangle that is used to draw the top surface of /// the slice. ///
boundingRectHeight float /// Height of the rectangle that is used to draw the top surface of /// the slice. ///
sliceHeight float /// Slice height. ///
startAngle float /// Starting angle. ///
sweepAngle float /// Sweep angle. ///
color Color /// Color used for slice rendering. ///
shadowStyle ShadowStyle /// Shadow style used for slice rendering. ///
edgeColorType EdgeColorType /// Edge lines color type. ///
edgeLineWidth float /// Edge lines width. ///
Résultat PieSlice

Dispose() public méthode

Disposes of all pie slices.
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draws the chart.
public Draw ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics object used for drawing. ///
Résultat void

DrawBottoms() protected méthode

Draws bottom sides of all pie slices.
protected DrawBottoms ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Résultat void

DrawSliceSides() protected méthode

Draws outer peripheries of all slices.
protected DrawSliceSides ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Résultat void

DrawTops() protected méthode

Draws top sides of all pie slices.
protected DrawTops ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used for drawing. ///
Résultat void

FindPieSliceUnderPoint() public méthode

Searches the chart to find the index of the pie slice which contains point given. Search order goes in the direction opposite to drawing order.
public FindPieSliceUnderPoint ( PointF point ) : int
point System.Drawing.PointF /// PointF point for which pie slice is searched for. ///
Résultat int

GetFittingRectangle() protected méthode

Finds the smallest rectangle int which chart fits entirely.
protected GetFittingRectangle ( ) : RectangleF
Résultat System.Drawing.RectangleF

GetSliceDisplacement() protected méthode

Calculates the displacement for given angle.
protected GetSliceDisplacement ( float angle, float displacementFactor ) : SizeF
angle float /// Angle (in degrees). ///
displacementFactor float /// Displacement factor. ///
Résultat System.Drawing.SizeF

InitializePieSlices() protected méthode

Initializes pies.
protected InitializePieSlices ( ) : void
Résultat void

PieChart3D() protected méthode

Initializes an empty instance of PieChart3D.
protected PieChart3D ( ) : System
Résultat System

PieChart3D() public méthode

Initializes a new instance of PieChart3D with given bounds, array of values and corresponding colors.
public PieChart3D ( RectangleF boundingRectangle, decimal values, Color sliceColors, float sliceRelativeHeight ) : System
boundingRectangle System.Drawing.RectangleF /// Bounding rectangle. ///
values decimal /// Array of values to chart. ///
sliceColors Color /// Colors used for rendering individual slices. ///
sliceRelativeHeight float /// Pie slice relative height. ///
Résultat System

PieChart3D() public méthode

Initializes a new instance of PieChart3D with given bounds, array of values and pie slice thickness.
public PieChart3D ( RectangleF boundingRectangle, decimal values, float sliceRelativeHeight ) : System
boundingRectangle System.Drawing.RectangleF /// Bounding rectangle. ///
values decimal /// Array of values to initialize with. ///
sliceRelativeHeight float
Résultat System

PieChart3D() public méthode

Initializes an instance of a flat PieChart3D with specified bounds, values to chart and relative thickness.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle that /// bounds the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle that /// bounds the chart. ///
widthBoundingRect float /// Width of the rectangle that bounds the chart. ///
heightBoundingRect float /// Height of the rectangle that bounds the chart. ///
values decimal /// An array of decimal values to chart. ///
Résultat System

PieChart3D() public méthode

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceColors Color /// An array of colors used to render slices. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
Résultat System

PieChart3D() public méthode

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, Color sliceColors, float sliceRelativeHeight, string texts ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceColors Color /// An array of colors used to render slices. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
texts string /// An array of strings that are displayed on corresponding slice. ///
Résultat System

PieChart3D() public méthode

Initializes an instance of PieChart3D with specified bounds, values to chart and relative thickness.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceRelativeHeight float /// Thickness of the pie slice to chart relative to the height of the /// bounding rectangle. ///
Résultat System

PieChart3D() public méthode

Initializes a new instance of PieChart3D with given bounds, array of values and relative pie slice height.
public PieChart3D ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, decimal values, float sliceRelativeHeight, string texts ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle bounding /// the chart. ///
widthBoundingRect float /// Width of the rectangle bounding the chart. ///
heightBoundingRect float /// Height of the rectangle bounding the chart. ///
values decimal /// An array of decimal values to chart. ///
sliceRelativeHeight float /// Thickness of the slice to chart relative to the height of the /// bounding rectangle. ///
texts string /// An array of strings that are displayed on corresponding slice. ///
Résultat System

PlaceTexts() public méthode

Draws strings by individual slices. Position of the text is calculated by overridable GetTextPosition method of the PieSlice type.
public PlaceTexts ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics object. ///
Résultat void

ReadjustSlices() protected méthode

Readjusts each slice for new bounding rectangle.
protected ReadjustSlices ( RectangleF newBoundingRectangle ) : void
newBoundingRectangle System.Drawing.RectangleF /// RectangleF representing new boundary. ///
Résultat void

Property Details

m_edgeColorType protected_oe property

Edge color type used for rendering.
protected EdgeColorType m_edgeColorType
Résultat EdgeColorType

m_edgeLineWidth protected_oe property

Edge line width.
protected float m_edgeLineWidth
Résultat float

m_fitToBoundingRectangle protected_oe property

Should the chart fit the bounding rectangle exactly.
protected bool m_fitToBoundingRectangle
Résultat bool

m_font protected_oe property

Font used to display texts.
protected Font,System.Drawing m_font
Résultat System.Drawing.Font

m_foreColor protected_oe property

Fore color used to display texts.
protected Color m_foreColor
Résultat Color

m_heightBoundingRect protected_oe property

Height of the bounding rectangle.
protected float m_heightBoundingRect
Résultat float

m_highlightedIndex protected_oe property

Index of the currently highlighted pie slice.
protected int m_highlightedIndex
Résultat int

m_initialAngle protected_oe property

Initial angle from which chart is drawn.
protected float m_initialAngle
Résultat float

m_pieSlices protected_oe property

Array of ordered pie slices constituting the chart, starting from 270 degrees axis.
protected PieSlice[],System.Drawing.PieChart m_pieSlices
Résultat System.Drawing.PieChart.PieSlice[]

m_pieSlicesMapping protected_oe property

Collection of reordered pie slices mapped to original order.
protected ArrayList,System.Collections m_pieSlicesMapping
Résultat System.Collections.ArrayList

m_shadowStyle protected_oe property

Shadow style.
protected ShadowStyle m_shadowStyle
Résultat ShadowStyle

m_sliceColors protected_oe property

Array of colors used for rendering.
protected Color[] m_sliceColors
Résultat Color[]

m_sliceRelativeDisplacements protected_oe property

Array of relative displacements from the common center.
protected float[] m_sliceRelativeDisplacements
Résultat float[]

m_sliceRelativeHeight protected_oe property

Slice relative height.
protected float m_sliceRelativeHeight
Résultat float

m_texts protected_oe property

Array of description texts.
protected string[] m_texts
Résultat string[]

m_values protected_oe property

Array of values to be presented by the chart.
protected decimal[] m_values
Résultat decimal[]

m_widthBoundingRect protected_oe property

Width of the bounding rectangle.
protected float m_widthBoundingRect
Résultat float

m_xBoundingRect protected_oe property

x-coordinate of the top left corner of the bounding rectangle.
protected float m_xBoundingRect
Résultat float

m_yBoundingRect protected_oe property

y-coordinate of the top left corner of the bounding rectangle.
protected float m_yBoundingRect
Résultat float