本文整理汇总了C++中CXTPChartDeviceCommand类的典型用法代码示例。如果您正苦于以下问题:C++ CXTPChartDeviceCommand类的具体用法?C++ CXTPChartDeviceCommand怎么用?C++ CXTPChartDeviceCommand使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CXTPChartDeviceCommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartPyramidSeriesPointView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
UNREFERENCED_PARAMETER(pDC);
CXTPChartColor color1 = GetColor();
CXTPChartColor color2 = GetColor2();
CXTPChartColor clrBorder = GetBorderActualColor();
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pPoint);
CXTPChartPyramidSeriesStyle* pStyle = STATIC_DOWNCAST(CXTPChartPyramidSeriesStyle, GetSeriesView()->GetStyle());
CXTPChartPoints arrPoints;
arrPoints.Add(CXTPChartPointF(m_rc.GetLeft() + int((m_rc.Width - m_rc.Width * m_dFrom) / 2), m_rc.GetTop()));
arrPoints.Add(CXTPChartPointF(m_rc.GetLeft() + int((m_rc.Width + m_rc.Width * m_dFrom) / 2), m_rc.GetTop()));
arrPoints.Add(CXTPChartPointF(m_rc.GetLeft() + int((m_rc.Width + m_rc.Width * m_dTo) / 2), m_rc.GetBottom()));
arrPoints.Add(CXTPChartPointF(m_rc.GetLeft() + int((m_rc.Width - m_rc.Width * m_dTo) / 2), m_rc.GetBottom()));
pCommand->AddChildCommand(pStyle->GetFillStyle()->CreateDeviceCommand(arrPoints, color1, color2));
if (pStyle->GetBorder()->IsVisible())
pCommand->AddChildCommand(new CXTPChartBoundedPolygonDeviceCommand(arrPoints, clrBorder, pStyle->GetBorder()->GetThickness()));
return pCommand;
}
示例2: CXTPChartHitTestElementCommand
CXTPChartDeviceCommand* CXTPChartRadarAxisYView::CreateLabelsDeviceCommand(CXTPChartDeviceContext* pDC)
{
if (!m_pAxis->GetLabel()->IsVisible())
return NULL;
CXTPChartDeviceCommand* pLabelsCommand = new CXTPChartHitTestElementCommand(m_pAxis->GetLabel(), m_rcBounds);
CXTPChartColor clrAxis = m_pAxis->GetActualColor();
int nAngle = m_pAxis->GetLabel()->GetAngle();
BOOL bNear = m_pAxis->GetAlignment() == xtpChartAxisNear;
int nOffset = m_pAxis->GetThickness() + (m_pAxis->GetTickMarks()->IsVisible() ? m_pAxis->GetTickMarks()->GetLength() : 0);
for (int i = 0; i < m_arrTicks.GetSize(); i++)
{
int nLeft = m_ptCenter.Y - (int)ValueToRadius(m_arrTicks[i].m_dValue);
CXTPChartString s = m_arrTicks[i].m_strLabel;
CXTPChartRotatedTextPainterNearLine painter(pDC, s, m_pAxis->GetLabel(), CPoint(bNear ? m_rcBounds.right - nOffset : m_rcBounds.left + nOffset, nLeft), bNear ? xtpChartTextNearLeft : xtpChartTextNearRight, (float)nAngle);
pLabelsCommand->AddChildCommand(painter.CreateDeviceCommand(pDC, m_pAxis->GetLabel()->GetActualTextColor()));
}
return pLabelsCommand;
}
示例3: GetAxis
CXTPChartDeviceCommand* CXTPChartRadarAxisYView::CreateTitleDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartAxisTitle* pTitle = GetAxis()->GetTitle();
if (!pTitle->IsVisible())
return NULL;
CXTPChartString strText = pTitle->GetText();
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(pTitle, m_rcBounds);
if (m_pAxis->GetAlignment() == xtpChartAxisNear)
{
CXTPChartRotatedTextPainterNearLine painter(pDC, pTitle->GetText(), pTitle,
CPoint(m_rcBounds.left, m_rcBounds.CenterPoint().y), xtpChartTextNearRight, 270);
pCommand->AddChildCommand(painter.CreateDeviceCommand(pDC, pTitle->GetActualTextColor()));
}
else
{
CXTPChartRotatedTextPainterNearLine painter(pDC, pTitle->GetText(), pTitle,
CPoint(m_rcBounds.right, m_rcBounds.CenterPoint().y), xtpChartTextNearLeft, 90);
pCommand->AddChildCommand(painter.CreateDeviceCommand(pDC, pTitle->GetActualTextColor()));
}
return pCommand;
}
示例4: CXTPChartPolygonAntialiasingDeviceCommand
CXTPChartDeviceCommand* CXTPChartRadarAxisXView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartDeviceCommand* pAxisCommand = new CXTPChartPolygonAntialiasingDeviceCommand(TRUE);
CXTPChartColor clrAxis = m_pAxis->GetActualColor();
int nThickness = m_pAxis->GetThickness();
if (m_pAxis->IsVisible())
{
if (nThickness > 0)
{
if (IsPolygonDiagramStyle())
{
CXTPChartLineStyle lineStyle(NULL);
lineStyle.SetThickness(nThickness);
pAxisCommand->AddChildCommand(GetDiagramView()->CreatePolygonLineDeviceCommand(pDC, m_nRadius, clrAxis, &lineStyle));
}
else
{
pAxisCommand->AddChildCommand(new CXTPChartBoundedCircleDeviceCommand(m_ptCenter, m_nRadius, clrAxis, nThickness));
}
}
pAxisCommand->AddChildCommand(CreateTickMarksDeviceCommand(pDC));
pAxisCommand->AddChildCommand(CreateLabelsDeviceCommand(pDC));
}
return pAxisCommand;
}
示例5: CXTPChartDeviceCommand
CXTPChartDeviceCommand* CXTPChartRadarAxisYView::CreateConstantLinesDeviceCommand(CXTPChartDeviceContext* pDC, BOOL bBehind)
{
CXTPChartAxisConstantLines* pConstantLines = m_pAxis->GetConstantLines();
if (pConstantLines->GetCount() == 0)
return NULL;
CXTPChartDeviceCommand* pCommands = new CXTPChartDeviceCommand();
for (int i = 0; i < pConstantLines->GetCount(); i++)
{
CXTPChartAxisConstantLine* pConstantLine = pConstantLines->GetAt(i);
if (!pConstantLine->IsVisible())
continue;
if (pConstantLine->IsShowBehind() != bBehind)
continue;
double dMark = !pConstantLine->GetAxisValue().IsEmpty() ? m_pAxis->GetScaleTypeMap()->ValueToInternal(pConstantLine->GetAxisValue()) :
pConstantLine->GetAxisValueInternal();
double dRad = ValueToRadius(dMark);
if (IsPolygonDiagramStyle())
pCommands->AddChildCommand(GetDiagramView()->CreatePolygonLineDeviceCommand(pDC, dRad, pConstantLine->GetActualColor(), pConstantLine->GetLineStyle()));
else
pCommands->AddChildCommand(new CXTPChartBoundedCircleDeviceCommand(m_ptCenter, dRad, pConstantLine->GetActualColor(),
pConstantLine->GetLineStyle()->GetThickness()));
}
return pCommands;
}
示例6: CXTPChartPolygonAntialiasingDeviceCommand
CXTPChartDeviceCommand* CXTPChartPyramidSeriesView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartDeviceCommand* pCommand = new CXTPChartPolygonAntialiasingDeviceCommand();
pCommand->AddChildCommand(CXTPChartSeriesView::CreateDeviceCommand(pDC));
return pCommand;
}
示例7: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartAreaSeriesView::CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds)
{
UNREFERENCED_PARAMETER(pDC);
rcBounds.DeflateRect(1, 1);
CXTPChartDeviceCommand* pCommand = new CXTPChartPolygonAntialiasingDeviceCommand();
CXTPChartAreaSeriesStyle* pStyle = STATIC_DOWNCAST(CXTPChartAreaSeriesStyle, m_pSeries->GetStyle());
CXTPChartPointF ptCenter(rcBounds.CenterPoint().x, rcBounds.top + 4) ;
int nSize = 8;
CXTPChartPoints arrPoints;
arrPoints.Add(CXTPChartPointF(rcBounds.left, rcBounds.bottom + 1));
arrPoints.Add(CXTPChartPointF(ptCenter.X, float(rcBounds.top + 4)));
arrPoints.Add(CXTPChartPointF(rcBounds.right, rcBounds.bottom + 1));
pCommand->AddChildCommand(pStyle->GetFillStyle()->CreateDeviceCommand(arrPoints, GetActualColor(), GetActualColor2()));
CXTPChartColor clrBorder = GetBorderActualColor();
pCommand->AddChildCommand(new CXTPChartSolidLineDeviceCommand(arrPoints[0], arrPoints[1], clrBorder, 1));
pCommand->AddChildCommand(new CXTPChartSolidLineDeviceCommand(arrPoints[1], arrPoints[2], clrBorder, 1));
pCommand->AddChildCommand(pStyle->GetMarker()->CreateDeviceCommand(pDC, ptCenter, nSize, GetColor(), GetColor2(), GetColor().GetDarkColor()));
return pCommand;
}
示例8: CXTPChartHitTestElementCommand
CXTPChartDeviceCommand* CXTPChartDiagramView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pDiagram, m_rcBounds);
pCommand->AddChildCommand(CXTPChartElementView::CreateDeviceCommand(pDC));
return pCommand;
}
示例9: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartRadarAxisYView::CreateTickMarksDeviceCommand(CXTPChartDeviceContext* pDC)
{
UNREFERENCED_PARAMETER(pDC);
CXTPChartDeviceCommand* pCommands = new CXTPChartHitTestElementCommand(m_pAxis, m_rcBounds);
CXTPChartAxisTickMarks* pTickMarks = m_pAxis->GetTickMarks();
if (!pTickMarks->IsVisible())
return pCommands;
int nScrollBarSize = 0;
CXTPChartColor clrAxis = m_pAxis->GetActualColor();
int nLength = pTickMarks->GetLength();
int nThickness = pTickMarks->GetThickness();
BOOL bMinorVisible = pTickMarks->IsMinorVisible();
BOOL bCross = pTickMarks->IsCrossAxis();
int nAxisThickness = m_pAxis->GetThickness() - 1 + nScrollBarSize;
int nExtraLength = bCross ? nLength + nAxisThickness : 0;
for (int i = 0; i < m_arrTicks.GetSize(); i++)
{
int nLeft = m_ptCenter.Y - (int)ValueToRadius(m_arrTicks[i].m_dValue);
if (m_pAxis->GetAlignment() == xtpChartAxisNear)
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(CXTPPoint3d(m_rcBounds.right - nAxisThickness - nLength, nLeft),
CXTPPoint3d(m_rcBounds.right - nAxisThickness + nExtraLength, nLeft), clrAxis, nThickness));
else
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(CXTPPoint3d(m_rcBounds.left + nAxisThickness - nExtraLength, nLeft),
CXTPPoint3d(m_rcBounds.left + nAxisThickness + nLength, nLeft), clrAxis, nThickness));
}
if (bMinorVisible)
{
nLength = pTickMarks->GetMinorLength();
int nExtraLength = bCross ? nLength + nAxisThickness : 0;
int nMinorThickness = pTickMarks->GetMinorThickness();
for (int i = 0; i < m_arrMinorTicks.GetSize(); i++)
{
int nLeft = m_ptCenter.Y - (int)ValueToRadius(m_arrMinorTicks[i]);
if (m_pAxis->GetAlignment() == xtpChartAxisNear)
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(CXTPPoint3d(m_rcBounds.right - nAxisThickness - nLength, nLeft),
CXTPPoint3d(m_rcBounds.right - nAxisThickness + nExtraLength, nLeft), clrAxis, nMinorThickness));
else
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(CXTPPoint3d(m_rcBounds.left + nAxisThickness - nExtraLength, nLeft),
CXTPPoint3d(m_rcBounds.left + nAxisThickness + nLength, nLeft), clrAxis, nMinorThickness));
}
}
return pCommands;
}
示例10: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartRadarAxisXView::CreateTickMarksDeviceCommand(CXTPChartDeviceContext* pDC)
{
UNREFERENCED_PARAMETER(pDC);
CXTPChartDeviceCommand* pCommands = new CXTPChartHitTestElementCommand(m_pAxis, m_rcBounds);
CXTPChartAxisTickMarks* pTickMarks = m_pAxis->GetTickMarks();
if (!pTickMarks->IsVisible())
return pCommands;
CXTPChartColor clrAxis = m_pAxis->GetActualColor();
int nLength = pTickMarks->GetLength();
int nThickness = pTickMarks->GetThickness();
BOOL bMinorVisible = pTickMarks->IsMinorVisible();
BOOL bCross = pTickMarks->IsCrossAxis();
int nAxisThickness = m_pAxis->GetThickness() - 1;
int nExtraLength = bCross ? nLength + nAxisThickness : 0;
for (int i = 0; i < m_arrTicks.GetSize(); i++)
{
double lineAngle = ValueToAngle(m_arrTicks[i].m_dValue);
double cs = cos(lineAngle);
double sn = sin(lineAngle);
CXTPChartPointF startPoint(m_ptCenter.X + (m_nRadius - nExtraLength) * cs, m_ptCenter.Y - (m_nRadius - nExtraLength) * sn);
CXTPChartPointF finishPoint(m_ptCenter.X + (m_nRadius + nAxisThickness + nLength) * cs, m_ptCenter.Y - (m_nRadius + nAxisThickness + nLength) * sn);
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(startPoint, finishPoint, clrAxis, nThickness));
}
if (bMinorVisible && !IsPolygonDiagramStyle())
{
nLength = pTickMarks->GetMinorLength();
int nExtraLength = bCross ? nLength + nAxisThickness : 0;
int nMinorThickness = pTickMarks->GetMinorThickness();
for (int i = 0; i < m_arrMinorTicks.GetSize(); i++)
{
double lineAngle = ValueToAngle(m_arrMinorTicks[i]);
double cs = cos(lineAngle);
double sn = sin(lineAngle);
CXTPChartPointF startPoint(m_ptCenter.X + (m_nRadius - nExtraLength) * cs, m_ptCenter.Y - (m_nRadius - nExtraLength) * sn);
CXTPChartPointF finishPoint(m_ptCenter.X + (m_nRadius + nAxisThickness + nLength) * cs, m_ptCenter.Y - (m_nRadius + nAxisThickness + nLength) * sn);
pCommands->AddChildCommand(new CXTPChartSolidLineDeviceCommand(startPoint, finishPoint, clrAxis, nMinorThickness));
}
}
return pCommands;
}
示例11: CXTPChartHitTestElementCommand
CXTPChartDeviceCommand* CXTPChartTitleView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pTitle);
CXTPChartRotatedTextPainterNearLine painter(pDC, m_strText, m_pTitle, m_ptOrigin, m_pTitle->GetNearTextPosition(), (float)m_pTitle->GetTextAngle());
CXTPChartDeviceCommand* pTextCommand = painter.CreateDeviceCommand(pDC, m_pTitle->GetActualTextColor());
pCommand->AddChildCommand(pTextCommand);
return pCommand;
}
示例12: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartHighLowSeriesPointView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
UNREFERENCED_PARAMETER(pDC);
CPoint pointOpen = GetScreenPoint(chartOpen).Round();
CPoint pointClose = GetScreenPoint(chartClose).Round();
CPoint pointLow = GetScreenPoint(chartLow).Round();
CPoint pointHight = GetScreenPoint(chartHigh).Round();
BOOL bUpColor = TRUE;
CXTPChartSeriesPoint* pPrevPoint = m_pPoint->GetPreviousPoint();
if (pPrevPoint)
{
if (pPrevPoint->GetValue(chartClose) > m_pPoint->GetValue(chartClose))
{
bUpColor = FALSE;
}
}
CXTPChartHighLowSeriesView* pView = (CXTPChartHighLowSeriesView*)GetSeriesView();
CXTPChartAxisView* pAxisView = pView->GetAxisViewX();
CXTPChartHighLowSeriesStyle* pStyle = (CXTPChartHighLowSeriesStyle*)GetSeriesView()->GetStyle();
int nWidth = (int)(pAxisView->DistanceToPoint(1) * 0.5);
if (nWidth < 5)
nWidth = 5;
int nLineThickness = pStyle->GetLineThickness();
nWidth = (nWidth & ~1) + nLineThickness * 3;
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pPoint);
CXTPChartColor color = bUpColor ? pStyle->GetUpColor() : pStyle->GetDownColor();
pCommand->AddChildCommand(new CXTPChartSolidLineDeviceCommand(
CXTPChartPointF(pointHight), CXTPChartPointF(pointLow), color, nLineThickness));
pCommand->AddChildCommand(new CXTPChartSolidLineDeviceCommand(
CXTPChartPointF(pointOpen), CXTPChartPointF((float)(pointOpen.x - nWidth / 2), (float)pointOpen.y), color, nLineThickness));
pCommand->AddChildCommand(new CXTPChartSolidLineDeviceCommand(
CXTPChartPointF(pointClose), CXTPChartPointF((float)(pointClose.x + nWidth / 2), (float)pointClose.y), color, nLineThickness));
return pCommand;
}
示例13: CXTPChartHitTestElementCommand
CXTPChartDeviceCommand* CXTPChartContentView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pContent, m_rcBounds);
pCommand->AddChildCommand(new CXTPChartSolidRectangleDeviceCommand(m_rcBounds, m_pContent->GetActualBackgroundColor()));
CXTPChartDeviceCommand* pDrawingType = pCommand->AddChildCommand(new CXTPChartDeviceCommand());
if (m_pContent->GetBorder()->IsVisible())
{
pDrawingType->AddChildCommand(m_pContent->GetBorder()->CreateInnerBorderDeviceCommand(m_rcBounds, m_pContent->GetActualBorderColor()));
}
if (m_pDiagramView)
{
pDrawingType->AddChildCommand(m_pDiagramView->CreateDeviceCommand(pDC));
}
if (m_pLegendView)
{
pDrawingType->AddChildCommand(m_pLegendView->CreateDeviceCommand(pDC));
}
if (m_pTitlesView)
{
pDrawingType->AddChildCommand(m_pTitlesView->CreateDeviceCommand(pDC));
}
return pCommand;
}
示例14: UNREFERENCED_PARAMETER
CXTPChartDeviceCommand* CXTPChartPointSeriesView::CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds)
{
UNREFERENCED_PARAMETER(pDC);
rcBounds.DeflateRect(1, 1, 2, 2);
CXTPChartDeviceCommand* pCommand = new CXTPChartDeviceCommand();
CXTPChartPointSeriesStyle* pStyle = STATIC_DOWNCAST(CXTPChartPointSeriesStyle, m_pSeries->GetStyle());
CXTPChartPointF ptCenter(rcBounds.CenterPoint().x, rcBounds.CenterPoint().y) ;
int nSize = min(rcBounds.Width(), rcBounds.Height());
pCommand->AddChildCommand(pStyle->GetMarker()->CreateDeviceCommand(pDC, ptCenter, nSize, GetColor(), GetColor2(), GetColor().GetDarkColor()));
return pCommand;
}
示例15: GetColor
CXTPChartDeviceCommand* CXTPChartPointSeriesPointView::CreateDeviceCommand(CXTPChartDeviceContext* pDC)
{
CXTPChartColor color = GetColor();
CXTPChartColor color2 = GetColor2();
CXTPChartColor colorBorder = GetColor().GetDarkColor();
if (CXTPChartMathUtils::IsNan(m_dInternalValue))
return NULL;
CXTPChartDeviceCommand* pCommand = new CXTPChartHitTestElementCommand(m_pPoint);
CXTPChartPointF point = GetScreenPoint();
pCommand->AddChildCommand(((CXTPChartPointSeriesStyle*)GetSeriesView()->GetStyle())->GetMarker()->CreateDeviceCommand(pDC, point, color, color2, colorBorder));
return pCommand;
}