about Pt_ARG_TREND_FLAGS

bridged with qdn.public.qnx4.photon
Post Reply
Jun

about Pt_ARG_TREND_FLAGS

Post by Jun » Tue Mar 26, 2002 2:06 pm

hello everybody,
I need to draw a figure out which has a data array, well, when trying to set
the Pt_ARG_TREND_FLAGS, I got problem: the default is:
Pt_TREND_HORIZONTAL|Pt_TREND_RIGHT_TO_LEFT
|Pt_GRID_IS_TRANSLUCENT
it shows me the figure on the right side, when I changed only the
Pt_TREND_LEFT_TO_RIGHT(while kept the other part there), nothing happend.
besides that, I want to use PtSetResource( ) function to set it, how to play
the "len" of PtSetResource here?? because when I change the "len" with
different numbers, my figure changes position.
here is my code:

/* Standard headers */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>

/* Local headers */
#include "ablibs.h"
#include "x26.h"
#include "abimport.h"
#include "proto.h"
#include <math.h>
//#include <afxcoll.h>


int
green_function( PtWidget_t *widget, ApInfo_t *apinfo, PtCallbackInfo_t
*cbinfo )

{

int color= 0;
int i;
short int min, max;
short int try[500];
long direction=1;
/* eliminate 'unreferenced' warnings */
widget = widget, apinfo = apinfo, cbinfo = cbinfo;

for (i=0; i<200; i++)
{
try = sin(i*2*3.1415926/200)*10;

}
//CPtrArray temp_array;
min=-10;
max=10;
PtSetResource(ABW_end_window, Pt_ARG_TREND_INC, 1,0);
PtSetResource(ABW_end_window, Pt_ARG_TREND_MAX,max,0);
PtSetResource(ABW_end_window, Pt_ARG_TREND_MIN,min,0);
PtSetResource(ABW_end_window, Pt_ARG_TREND_DATA, try,200);
PtSetResource(ABW_end_window, Pt_ARG_TREND_FLAGS,
Pt_TREND_HORIZONTAL|Pt_TREND_LEFT_TO_RIGHT,0);

return( Pt_CONTINUE );

}

Post Reply

Return to “qdn.public.qnx4.photon”