[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Multi-Colored Chart Backgrounds



PureBytes Links

Trading Reference Links

electricwally77 wrote:
Aron, Great job on the three color gradient. I have been playing with
your code and can't seem to code the center color so it blends into
the top and bottom (much like the top and bottom color blend). Right
now, as the code is written, it shows the center color as more of a
tighter range of blend than the top and bottom. 

In other words, the center color is more focused in on the center. I
hope I am explaining this correctly. I certainly can live with the
code the way it is written but if you have a way to "open" up the
center color so it blends more like the top and bottom, I would
appreciate the help. Thanks again. Wally 
  
You can now widen the center , move it up and down
as well as control title, date an price axes colors:


_SECTION_BEGIN("3 color gradient");

priceAxesWidth=
68;
dateAxesHeight=
17;
TitleHeight=
17;

pxwidth =
Status("pxwidth");
pxheight =
Status("pxheight");

chartwidth = pxwidth-priceAxesWidth;
chartheight = pxheight-dateAxesHeight;

topColor=
ParamColor("topColor",colorLightBlue);
centerColor=
ParamColor("centerColor", colorWhite );
botColor=
ParamColor("BottomColor", colorLightBlue );
priceAxesColor=
ParamColor("priceAxesColor", colorWhite );
dateAxesColor=
ParamColor("dateAxesColor", colorWhite);

relPos=
Param("centerPosition%",50,0,100,1)/100;
centerHeight=chartheight*
Param("centerHeight%",10,0,100,1)/100;
x0=
0;
y0=
Max(TitleHeight,chartheight*relPos-centerHeight/2);
x1=chartwidth;
y1=
Min(chartheight,chartheight*relPos+centerHeight/2);

GfxSetBkMode( 1 );
GfxSetOverlayMode(1);
GfxGradientRect(0,0,chartwidth,TitleHeight, colorWhite ,colorWhite);
GfxGradientRect(chartwidth,0,pxwidth,pxheight, priceAxesColor ,priceAxesColor);
GfxGradientRect(0,chartheight,chartwidth,pxheight, dateAxesColor ,dateAxesColor);
GfxGradientRect(x0,y0,x1,y1, CenterColor ,CenterColor );
GfxGradientRect(0,TitleHeight,chartwidth, y0,topColor, CenterColor );
GfxGradientRect(0,y1,chartwidth, chartheight,  CenterColor ,botColor);

_SECTION_END();
__._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___