You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
4.5 KiB
C++
121 lines
4.5 KiB
C++
// XTPChartPieSeriesPointView.h
|
|
//
|
|
// This file is a part of the XTREME TOOLKIT PRO MFC class library.
|
|
// (c)1998-2012 Codejock Software, All Rights Reserved.
|
|
//
|
|
// THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
|
|
// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
|
|
// CONSENT OF CODEJOCK SOFTWARE.
|
|
//
|
|
// THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
|
|
// IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
|
|
// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
|
|
// SINGLE COMPUTER.
|
|
//
|
|
// CONTACT INFORMATION:
|
|
// support@codejock.com
|
|
// http://www.codejock.com
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//{{AFX_CODEJOCK_PRIVATE
|
|
#if !defined(__XTPCHARTPIESERIESPOINTVIEW_H__)
|
|
#define __XTPCHARTPIESERIESPOINTVIEW_H__
|
|
//}}AFX_CODEJOCK_PRIVATE
|
|
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif // _MSC_VER >= 1000
|
|
|
|
//===========================================================================
|
|
// Summary:
|
|
// This class abstracts the view of a pie series point.This class is a kind of
|
|
// CXTPChartSeriesPointView.
|
|
// Remarks:
|
|
// A pie chart (or a circle graph) is a circular chart divided into sectors,
|
|
// illustrating percents. In a pie chart, the arc length of each sector (and
|
|
// consequently its central angle and area), is proportional to the quantity
|
|
// it represents. Together, the sectors create a full disk.
|
|
//===========================================================================
|
|
class _XTP_EXT_CLASS CXTPChartPieSeriesPointView : public CXTPChartSeriesPointView
|
|
{
|
|
public:
|
|
//-----------------------------------------------------------------------
|
|
// Summary:
|
|
// Constructs a CXTPChartPieSeriesPointView object.
|
|
// Parameters:
|
|
// pPoint - Pointer to chart series point.
|
|
// Remarks:
|
|
//-----------------------------------------------------------------------
|
|
CXTPChartPieSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView);
|
|
|
|
//-------------------------------------------------------------------------
|
|
// Summary:
|
|
// Destroys a CXTPChartPieSeriesPointView object, handle cleanup.
|
|
//-------------------------------------------------------------------------
|
|
virtual ~CXTPChartPieSeriesPointView();
|
|
|
|
public:
|
|
//-------------------------------------------------------------------------
|
|
// Summary:
|
|
// Use this function to calculate the layout of the pie series point.
|
|
// Parameters:
|
|
// dAngle - The swipe angle of the sector(pie).
|
|
//-------------------------------------------------------------------------
|
|
void CalculateLayout(double& dAngle);
|
|
|
|
//-------------------------------------------------------------------------
|
|
// Summary:
|
|
// Use this function to get the pie for the point.
|
|
// Returns:
|
|
// A pointer CXTPChartPie object which represents a pie.
|
|
//-------------------------------------------------------------------------
|
|
CXTPChartPie* GetPie() const;
|
|
|
|
//-------------------------------------------------------------------------
|
|
// Summary:
|
|
// Use this function to get the pie for the point.
|
|
// Returns:
|
|
// A pointer CXTPChartPie object which represents a pie.
|
|
//-------------------------------------------------------------------------
|
|
CXTPChartPointF GetBasePoint() const;
|
|
|
|
protected:
|
|
|
|
//-------------------------------------------------------------------------
|
|
// Summary:
|
|
// This function create a CXTPChartDeviceCommand object, this object
|
|
// represents the rendering of the pie series point.
|
|
// Parameters:
|
|
// pDC - Pointer to a CXTPChartDeviceContext object.
|
|
// Returns:
|
|
// Returns CXTPChartDeviceCommand object, this object handles
|
|
// the rendering of an element in the chart.Here it handles
|
|
// the drawing of the pie series point.
|
|
// Remarks:
|
|
// See Also:
|
|
//-------------------------------------------------------------------------
|
|
virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC);
|
|
|
|
CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds);
|
|
|
|
public:
|
|
double m_dValue; //The value of the point.
|
|
CXTPChartPie* m_pPie; //The pie for this point.
|
|
CXTPChartPointF m_basePoint; //The base point.
|
|
|
|
friend class CXTPChartPieSeriesView;
|
|
};
|
|
|
|
AFX_INLINE CXTPChartPie* CXTPChartPieSeriesPointView::GetPie() const
|
|
{
|
|
return m_pPie;
|
|
}
|
|
|
|
AFX_INLINE CXTPChartPointF CXTPChartPieSeriesPointView::GetBasePoint() const
|
|
{
|
|
return m_basePoint;
|
|
}
|
|
|
|
#endif //#if !defined(__XTPCHARTPIESERIESPOINTVIEW_H__)
|