C# 클래스 System.Drawing.PieChart.PieSlice

Object representing 3D pie.
상속: Object, IDisposable
파일 보기 프로젝트 열기: Longkong/Pojjaman 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_boundingRectangle System.Drawing.RectangleF
m_brushEndSide System.Drawing.Brush
m_brushPeripherySurface System.Drawing.Brush
m_brushStartSide System.Drawing.Brush
m_brushSurface System.Drawing.Brush
m_brushSurfaceHighlighted System.Drawing.Brush
m_center System.Drawing.PointF
m_centerBelow System.Drawing.PointF
m_endSide System.Drawing.Quadrilateral
m_pen System.Drawing.Pen
m_pointEnd System.Drawing.PointF
m_pointEndBelow System.Drawing.PointF
m_pointStart System.Drawing.PointF
m_pointStartBelow System.Drawing.PointF
m_sliceHeight float
m_startAngle float
m_startSide System.Drawing.Quadrilateral
m_sweepAngle float

Private Properties

프로퍼티 타입 설명
BottomSurfaceSectionContainsPoint bool
CreatePathForCylinderSurfaceSection System.Drawing.Drawing2D.GraphicsPath
CylinderSurfaceSectionContainsPoint bool
DrawBottom void
DrawEndSide void
DrawHiddenPeriphery void
DrawSides void
DrawStartSide void
DrawTop void
DrawVisiblePeriphery void
EndSideContainsPoint bool
GetEllipseRadius double
GetFittingRectangle System.Drawing.RectangleF
GetHiddenPeripherySurfaceBounds PeripherySurfaceBounds[]
GetVisiblePeripherySurfaceBounds PeripherySurfaceBounds[]
InitializePieSlice void
InitializeSides void
InitializeSides void
PeripheryContainsPoint bool
PieSliceContainsPoint bool
PieSliceContainsPoint bool
Readjust void
Split System.Drawing.PieChart.PieSlice[]
StartSideContainsPoint bool

공개 메소드들

메소드 설명
Contains ( PointF point ) : bool

Checks if given pie slice contains given point.

Dispose ( ) : void

Disposes of all resources used by PieSlice object.

Draw ( Graphics graphics ) : void

Draws the pie slice.

GetTextPosition ( ) : PointF

Evaluates the point in the middle of the slice.

PieSlice ( Rectangle boundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : System

Initializes a new instance of PieSlice class with given bounds and visual style.

PieSlice ( RectangleF boundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType ) : System

Initializes a new instance of PieSlice class with given bounds and visual style.

PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float startAngle, float sweepAngle, Color surfaceColor ) : System

Initializes a new instance of flat PieSlice class with given bounds and visual style.

PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType ) : System

Initializes a new instance of PieSlice class with given bounds and visual style.

PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : System

Initializes a new instance of PieSlice class with given bounds and visual style.

보호된 메소드들

메소드 설명
CreateBrushForPeriphery ( Color color ) : Brush

Creates a brush for outer periphery of the pie slice used for gradual shadow.

CreateBrushForSide ( Color color, double angle ) : Brush

Creates a brush for start and end sides of the pie slice for gradual shade.

CreateSurfaceBrushes ( Color surfaceColor, ShadowStyle shadowStyle ) : void

Creates brushes used to render the pie slice.

DisposeBrushes ( ) : void

Disposes of brush objects.

DrawCylinderSurfaceSection ( Graphics graphics, Pen pen, Brush brush, float startAngle, float endAngle, PointF pointStart, PointF pointEnd ) : void

Draws the outer periphery of the pie slice.

GetActualAngle ( float transformedAngle ) : float

Gets the actual angle from the rendering angle.

PeripheralPoint ( float xCenter, float yCenter, float semiMajor, float semiMinor, float angleDegrees ) : PointF

Calculates the point on ellipse periphery for angle.

PieSlice ( ) : System

Initializes an empty instance of PieSlice.

TransformAngle ( float angle ) : float

Transforms actual angle to angle used for rendering. They are different because of perspective.

비공개 메소드들

메소드 설명
BottomSurfaceSectionContainsPoint ( PointF point ) : bool

Checks if bottom side of the pie slice contains the point.

CreatePathForCylinderSurfaceSection ( float startAngle, float endAngle, PointF pointStart, PointF pointEnd ) : GraphicsPath

Creates GraphicsPath for cylinder surface section. This path consists of two arcs and two vertical lines.

CylinderSurfaceSectionContainsPoint ( PointF point, float startAngle, float endAngle, PointF point1, PointF point2 ) : bool

Checks if given point is contained within upper and lower pie slice surfaces or within the outer slice brink.

DrawBottom ( Graphics graphics ) : void

Draws the bottom of the pie slice.

DrawEndSide ( Graphics graphics ) : void

Draws visible end side.

DrawHiddenPeriphery ( Graphics graphics ) : void

Draws hidden outer periphery of the pie slice.

DrawSides ( Graphics graphics ) : void

Draws pie slice sides.

DrawStartSide ( Graphics graphics ) : void

Draws visible start side.

DrawTop ( Graphics graphics ) : void

Draws the top of the pie slice.

DrawVisiblePeriphery ( Graphics graphics ) : void

Draws visible outer periphery of the pie slice.

EndSideContainsPoint ( PointF point ) : bool

Checks if point provided is inside pie slice end cut side.

GetEllipseRadius ( double angle ) : double

Evaluates the distance of an ellipse perimeter point for a given angle.

GetFittingRectangle ( ) : RectangleF

Calculates the smallest rectangle into which this pie slice fits.

GetHiddenPeripherySurfaceBounds ( ) : PeripherySurfaceBounds[]

Gets an array of hidden periphery bounds.

GetVisiblePeripherySurfaceBounds ( ) : PeripherySurfaceBounds[]

Gets an array of visible periphery bounds.

InitializePieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight ) : void

Initializes pie bounding rectangle, pie height, corners coordinates and brushes used for rendering.

InitializeSides ( ) : void

Initializes start and end pie slice sides.

InitializeSides ( bool startSideExists, bool endSideExists ) : void

Initializes start and end pie slice sides.

PeripheryContainsPoint ( PointF point ) : bool

Checks if given point is contained by cylinder periphery.

PieSliceContainsPoint ( PointF point ) : bool

Checks if given point is contained inside the pie slice.

PieSliceContainsPoint ( PointF point, float xBoundingRectangle, float yBoundingRectangle, float widthBoundingRectangle, float heightBoundingRectangle, float startAngle, float sweepAngle ) : bool

Checks if point given is contained within the pie slice.

Readjust ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight ) : void

Reajusts the pie slice to fit new bounding rectangle provided.

Split ( float splitAngle ) : System.Drawing.PieChart.PieSlice[]

Splits a pie slice into two on the split angle.

StartSideContainsPoint ( PointF point ) : bool

Checks if point provided is inside pie slice start cut side.

메소드 상세

Contains() 공개 메소드

Checks if given pie slice contains given point.
public Contains ( PointF point ) : bool
point System.Drawing.PointF /// PointF to check. ///
리턴 bool

CreateBrushForPeriphery() 보호된 메소드

Creates a brush for outer periphery of the pie slice used for gradual shadow.
protected CreateBrushForPeriphery ( Color color ) : Brush
color Color /// Color used for pie slice rendering. ///
리턴 System.Drawing.Brush

CreateBrushForSide() 보호된 메소드

Creates a brush for start and end sides of the pie slice for gradual shade.
protected CreateBrushForSide ( Color color, double angle ) : Brush
color Color /// Color used for pie slice rendering. ///
angle double /// Angle of the surface. ///
리턴 System.Drawing.Brush

CreateSurfaceBrushes() 보호된 메소드

Creates brushes used to render the pie slice.
protected CreateSurfaceBrushes ( Color surfaceColor, ShadowStyle shadowStyle ) : void
surfaceColor Color /// Color used for rendering. ///
shadowStyle ShadowStyle /// Shadow style used for rendering. ///
리턴 void

Dispose() 공개 메소드

Disposes of all resources used by PieSlice object.
public Dispose ( ) : void
리턴 void

DisposeBrushes() 보호된 메소드

Disposes of brush objects.
protected DisposeBrushes ( ) : void
리턴 void

Draw() 공개 메소드

Draws the pie slice.
public Draw ( Graphics graphics ) : void
graphics System.Drawing.Graphics /// Graphics used to draw the pie slice. ///
리턴 void

DrawCylinderSurfaceSection() 보호된 메소드

Draws the outer periphery of the pie slice.
protected DrawCylinderSurfaceSection ( Graphics graphics, Pen pen, Brush brush, float startAngle, float endAngle, PointF pointStart, PointF pointEnd ) : void
graphics System.Drawing.Graphics /// Graphics object used to draw the surface. ///
pen System.Drawing.Pen /// Pen used to draw outline. ///
brush System.Drawing.Brush /// Brush used to fill the quadrilateral. ///
startAngle float /// Start angle (in degrees) of the periphery section. ///
endAngle float /// End angle (in degrees) of the periphery section. ///
pointStart System.Drawing.PointF /// Point representing the start of the periphery. ///
pointEnd System.Drawing.PointF /// Point representing the end of the periphery. ///
리턴 void

GetActualAngle() 보호된 메소드

Gets the actual angle from the rendering angle.
protected GetActualAngle ( float transformedAngle ) : float
transformedAngle float /// Transformed angle for which actual angle has to be evaluated. ///
리턴 float

GetTextPosition() 공개 메소드

Evaluates the point in the middle of the slice.
public GetTextPosition ( ) : PointF
리턴 System.Drawing.PointF

PeripheralPoint() 보호된 메소드

Calculates the point on ellipse periphery for angle.
protected PeripheralPoint ( float xCenter, float yCenter, float semiMajor, float semiMinor, float angleDegrees ) : PointF
xCenter float /// x-coordinate of the center of the ellipse. ///
yCenter float /// y-coordinate of the center of the ellipse. ///
semiMajor float /// Horizontal semi-axis. ///
semiMinor float /// Vertical semi-axis. ///
angleDegrees float /// Angle (in degrees) for which corresponding periphery point has to /// be obtained. ///
리턴 System.Drawing.PointF

PieSlice() 보호된 메소드

Initializes an empty instance of PieSlice.
protected PieSlice ( ) : System
리턴 System

PieSlice() 공개 메소드

Initializes a new instance of PieSlice class with given bounds and visual style.
public PieSlice ( Rectangle boundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : System
boundingRect System.Drawing.Rectangle /// Bounding rectangle used to draw the top surface of the pie slice. ///
sliceHeight float /// Pie slice height. ///
startAngle float /// Starting angle (in degrees) of the pie slice. ///
sweepAngle float /// Sweep angle (in degrees) of the pie slice. ///
surfaceColor Color /// Color used to render pie slice surface. ///
shadowStyle ShadowStyle /// Shadow style used in rendering. ///
edgeColorType EdgeColorType /// Edge color type used for rendering. ///
edgeLineWidth float /// Edge line width. ///
리턴 System

PieSlice() 공개 메소드

Initializes a new instance of PieSlice class with given bounds and visual style.
public PieSlice ( RectangleF boundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType ) : System
boundingRect System.Drawing.RectangleF /// Bounding rectangle used to draw the top surface of the slice. ///
sliceHeight float /// Pie slice height. ///
startAngle float /// Starting angle (in degrees) of the pie slice. ///
sweepAngle float /// Sweep angle (in degrees) of the pie slice. ///
surfaceColor Color /// Color used to render pie slice surface. ///
shadowStyle ShadowStyle /// Shadow style used in rendering. ///
edgeColorType EdgeColorType /// Edge color type used for rendering. ///
리턴 System

PieSlice() 공개 메소드

Initializes a new instance of flat PieSlice class with given bounds and visual style.
public PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float startAngle, float sweepAngle, Color surfaceColor ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
widthBoundingRect float /// Width of the rectangle that is used to draw the top surface of /// the pie slice. ///
heightBoundingRect float /// Height of the rectangle that is used to draw the top surface of /// the pie slice. ///
startAngle float /// Starting angle (in degrees) of the pie slice. ///
sweepAngle float /// Sweep angle (in degrees) of the pie slice. ///
surfaceColor Color /// Color used to paint the pie slice. ///
리턴 System

PieSlice() 공개 메소드

Initializes a new instance of PieSlice class with given bounds and visual style.
public PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
widthBoundingRect float /// Width of the rectangle that is used to draw the top surface of /// the pie slice. ///
heightBoundingRect float /// Height of the rectangle that is used to draw the top surface of /// the pie slice. ///
sliceHeight float /// Height of the pie slice. ///
startAngle float /// Starting angle (in degrees) of the pie slice. ///
sweepAngle float /// Sweep angle (in degrees) of the pie slice. ///
surfaceColor Color /// Color used to paint the pie slice. ///
shadowStyle ShadowStyle /// Shadow style used for slice rendering. ///
edgeColorType EdgeColorType /// Edge color style used for slice rendering. ///
리턴 System

PieSlice() 공개 메소드

Initializes a new instance of PieSlice class with given bounds and visual style.
public PieSlice ( float xBoundingRect, float yBoundingRect, float widthBoundingRect, float heightBoundingRect, float sliceHeight, float startAngle, float sweepAngle, Color surfaceColor, ShadowStyle shadowStyle, EdgeColorType edgeColorType, float edgeLineWidth ) : System
xBoundingRect float /// x-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
yBoundingRect float /// y-coordinate of the upper-left corner of the rectangle that is /// used to draw the top surface of the pie slice. ///
widthBoundingRect float /// Width of the rectangle that is used to draw the top surface of /// the pie slice. ///
heightBoundingRect float /// Height of the rectangle that is used to draw the top surface of /// the pie slice. ///
sliceHeight float /// Height of the pie slice. ///
startAngle float /// Starting angle (in degrees) of the pie slice. ///
sweepAngle float /// Sweep angle (in degrees) of the pie slice. ///
surfaceColor Color /// Color used to render pie slice surface. ///
shadowStyle ShadowStyle /// Shadow style used in rendering. ///
edgeColorType EdgeColorType /// Edge color type used for rendering. ///
edgeLineWidth float /// Edge line width. ///
리턴 System

TransformAngle() 보호된 메소드

Transforms actual angle to angle used for rendering. They are different because of perspective.
protected TransformAngle ( float angle ) : float
angle float /// Actual angle. ///
리턴 float

프로퍼티 상세

m_boundingRectangle 보호되어 있는 프로퍼티

Bounding rectangle that bounds the ellipse from which pie slice is cut.
protected RectangleF,System.Drawing m_boundingRectangle
리턴 System.Drawing.RectangleF

m_brushEndSide 보호되어 있는 프로퍼티

Brush used to render slice ending cut side.
protected Brush,System.Drawing m_brushEndSide
리턴 System.Drawing.Brush

m_brushPeripherySurface 보호되어 있는 프로퍼티

Brush used to render pie slice periphery (cylinder outer surface).
protected Brush,System.Drawing m_brushPeripherySurface
리턴 System.Drawing.Brush

m_brushStartSide 보호되어 있는 프로퍼티

Brush used to render slice starting cut side.
protected Brush,System.Drawing m_brushStartSide
리턴 System.Drawing.Brush

m_brushSurface 보호되어 있는 프로퍼티

Brush used to render slice top surface.
protected Brush,System.Drawing m_brushSurface
리턴 System.Drawing.Brush

m_brushSurfaceHighlighted 보호되어 있는 프로퍼티

Brush used to render slice top surface when highlighted.
protected Brush,System.Drawing m_brushSurfaceHighlighted
리턴 System.Drawing.Brush

m_center 보호되어 있는 프로퍼티

PointF corresponding to pie slice center.
protected PointF,System.Drawing m_center
리턴 System.Drawing.PointF

m_centerBelow 보호되어 있는 프로퍼티

PointF corresponding to the lower pie slice center.
protected PointF,System.Drawing m_centerBelow
리턴 System.Drawing.PointF

m_endSide 보호되어 있는 프로퍼티

Quadrilateral representing the end side.
protected Quadrilateral,System.Drawing m_endSide
리턴 System.Drawing.Quadrilateral

m_pen 보호되어 있는 프로퍼티

Pen object used to draw pie slice edges.
protected Pen,System.Drawing m_pen
리턴 System.Drawing.Pen

m_pointEnd 보호되어 있는 프로퍼티

PointF on the periphery corresponding to the end cut side.
protected PointF,System.Drawing m_pointEnd
리턴 System.Drawing.PointF

m_pointEndBelow 보호되어 있는 프로퍼티

PointF on the periphery corresponding to the end cut side.
protected PointF,System.Drawing m_pointEndBelow
리턴 System.Drawing.PointF

m_pointStart 보호되어 있는 프로퍼티

PointF on the periphery corresponding to the start cut side.
protected PointF,System.Drawing m_pointStart
리턴 System.Drawing.PointF

m_pointStartBelow 보호되어 있는 프로퍼티

PointF on the periphery corresponding to the start cut side.
protected PointF,System.Drawing m_pointStartBelow
리턴 System.Drawing.PointF

m_sliceHeight 보호되어 있는 프로퍼티

Pie slice height.
protected float m_sliceHeight
리턴 float

m_startAngle 보호되어 있는 프로퍼티

Start angle.
protected float m_startAngle
리턴 float

m_startSide 보호되어 있는 프로퍼티

Quadrilateral representing the start side.
protected Quadrilateral,System.Drawing m_startSide
리턴 System.Drawing.Quadrilateral

m_sweepAngle 보호되어 있는 프로퍼티

Sweep angle.
protected float m_sweepAngle
리턴 float