Jump to content
Software FX Community

How to make gradients in VC++


User (Legacy)

Recommended Posts

To get the bars (area, etc.) painted with gradients

m_chartPtr->Chart3D = false;

m_chartPtr->_Gallery = Cfx62::Gallery_Bar;

m_chartPtr->_Scheme = Cfx62::Scheme_Gradient;

m_chartPtr->Series->GetItem(0)->Color = RGB(255,0,0);

m_chartPtr->Series->GetItem(0)->AlternateColor = RGB(255,128,0);

Note that in the previous code, Series 0 will go from Red to Orange while

Series 1 will retain the default settings (from green to a darker green).

To get the chart background painted with gradients

Cfx62Borders::_GradientBackgroundPtr gradBack;

gradBack.CreateInstance(__uuidof(Cfx62Borders::GradientBackground));

gradBack->Type = Cfx62Borders::GradientType_Vertical;

gradBack->ColorFrom = RGB(255,0,0);

gradBack->ColorTo = RGB(0,255,0);

VARIANT v;

V_VT(&v) = VT_DISPATCH;

V_DISPATCH(&v) = gradBack;

m_chartPtr->BackObject = v;

Note that the previous code depends on having a #import to reference the

ChartFX.ClientServer.Borders.dll, e.g.

#import "ChartFX.ClientServer.core.dll" rename_namespace("Cfx62")

rename("min","minX") rename("max","maxX")

exclude("_CollectionBase","_Component","CollectionBase","Component")

#import "ChartFX.ClientServer.Borders.dll" rename_namespace("Cfx62Borders")

rename("min","minX") rename("max","maxX")

exclude("_CollectionBase","_Component","CollectionBase","Component")

--

JC

Software FX Support

"James" <youngho13@gmail.com> wrote in message

news:%23ga3D7w6FHA.472@webserver3.softwarefx.com...

> Hi,

>

> How to make gradients in VC++?

>

> Thanks,

>

Link to comment
Share on other sites

To get the bars (area, etc.) painted with gradients

m_chartPtr->Chart3D = false;

m_chartPtr->_Gallery = Cfx62::Gallery_Bar;

m_chartPtr->_Scheme = Cfx62::Scheme_Gradient;

m_chartPtr->Series->GetItem(0)->Color = RGB(255,0,0);

m_chartPtr->Series->GetItem(0)->AlternateColor = RGB(255,128,0);

Note that in the previous code, Series 0 will go from Red to Orange while

Series 1 will retain the default settings (from green to a darker green).

To get the chart background painted with gradients

Cfx62Borders::_GradientBackgroundPtr gradBack;

gradBack.CreateInstance(__uuidof(Cfx62Borders::GradientBackground));

gradBack->Type = Cfx62Borders::GradientType_Vertical;

gradBack->ColorFrom = RGB(255,0,0);

gradBack->ColorTo = RGB(0,255,0);

VARIANT v;

V_VT(&v) = VT_DISPATCH;

V_DISPATCH(&v) = gradBack;

m_chartPtr->BackObject = v;

Note that the previous code depends on having a #import to reference the

ChartFX.ClientServer.Borders.dll, e.g.

#import "ChartFX.ClientServer.core.dll" rename_namespace("Cfx62")

rename("min","minX") rename("max","maxX")

exclude("_CollectionBase","_Component","CollectionBase","Component")

#import "ChartFX.ClientServer.Borders.dll" rename_namespace("Cfx62Borders")

rename("min","minX") rename("max","maxX")

exclude("_CollectionBase","_Component","CollectionBase","Component")

--

JC

Software FX Support

"James" <youngho13@gmail.com> wrote in message

news:%23ga3D7w6FHA.472@webserver3.softwarefx.com...

> Hi,

>

> How to make gradients in VC++?

>

> Thanks,

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...