How to Use LowLevelGraphics to divide the chart pane

Hello,

I want to divide the chart into four quadrants and name the left,right,top and bottom parts with different background colors. Which functions should be used? Is it GfxSetBkColor( color ) or GfxTextOut( "text", x, y )

_SECTION_BEGIN( "LowLevelGraphicsChart" );

EnableTextOutput( False );
GfxSetOverlayMode( 2);

left = Status( "left" );
right = Status( "right" );
top = Status( "top" );
bottom = Status( "bottom" );
width = ( right - left ) / 2;
height = ( bottom - top ) / 2;

_SECTION_END();

image

Source:-

Thank you

Look at functions GfxFillSolidRect or GfxGradientRect. You can set color and positions with those two ones.

As for text there are GfxSetTextColor and GfxTextOut or there is GfxDrawText.

2 Likes

I am not good at math. I tried the following but not able to understand

_SECTION_BEGIN( "LowLevelGraphicsChart" );

EnableTextOutput( False );
GfxSetOverlayMode( 2);

left = Status( "left" );
right = Status( "right" );
top = Status( "top" );
bottom = Status( "bottom" );
width = ( right - left ) / 2;
height = ( bottom - top ) / 2;

GfxGradientRect( 0, 00, 600, 600, colorLavender, colorBlack  ); 

_SECTION_END();

image

Thank you

Use the rectangle function multiple times.

In your case four times (with different x/y and different colors).

_SECTION_BEGIN( "LowLevelGraphicsChart" );

EnableTextOutput( False );
GfxSetOverlayMode( 2);

left = Status( "pxchartleft" );
right = Status( "pxchartright" );
top = Status( "pxcharttop" );
bottom = Status( "pxchartbottom" );

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

GfxGradientRect( 0, 0, width/2, height/2, colorLavender, colorBlack  ); 
//GfxGradientRect( ...  ); 
//GfxGradientRect( ... ); 
//GfxGradientRect( ...  ); 
_SECTION_END();
1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.