Exemplo n.º 1
0
static void pepnet_plotresidue(char c, float x, float y, const char *squares,
			       const char *octags, const char *diamonds)
{
    static char cs[2];

    cs[1] = '\0';
    *cs=c;


    ajGraphicsSetFgcolour(GREEN);

    if(strstr(squares,cs))
    {
	ajGraphicsSetFgcolour(BLUE);
	ajGraphicsDrawposBox(x-(float)1.5,y-(float)1.32,(float)3.0);
    }

    if(strstr(octags,cs))
    {
	ajGraphicsSetFgcolour(BLUEVIOLET);
	pepnet_drawocta(x,y+(float)0.225,(float)20.0);
    }

    if(strstr(diamonds,cs))
    {
	ajGraphicsSetFgcolour(RED);
	ajGraphicsDrawposDia(x-(float)2.5,y-(float)2.25,(float)5.0);
    }

    ajGraphicsDrawposTextJustify(x,y,cs,0.5);
    ajGraphicsSetFgcolour(GREEN);

    return;
}
Exemplo n.º 2
0
static void pepwheel_plotresidue(char c, float r, float a, const char *squares,
				 const char *octags, const char *diamonds,
				 float xmin, float xmax,
				 float ymin, float ymax)
{
    float  x;
    float  y;

    static char cs[2];

    cs[1] = '\0';
    *cs   = c;

    ajCvtPolToRec(r, a, &x, &y);

    if(x<xmin+.1 || x>xmax-.1 || y<ymin+.2 || y>ymax-.2)
	return;


    ajGraphicsSetFgcolour(AJB_PURPLE);

    if(strstr(squares,cs))
    {
	ajGraphicsSetFgcolour(AJB_BLUE);
	ajGraphicsDrawposBox(x-(float)0.025,y-(float)0.022,(float)0.05);
    }

    if(strstr(octags,cs))
    {
	ajGraphicsSetFgcolour(AJB_BLACK);
	pepwheel_drawocta(x,y+(float)0.003,(float)0.28);
    }

    if(strstr(diamonds,cs))
    {
	ajGraphicsSetFgcolour(AJB_RED);
	ajGraphicsDrawposDia(x-(float)0.042,y-(float)0.04,(float)0.085);
    }

    ajGraphicsDrawposTextJustify(x,y,cs,0.5);
    ajGraphicsSetFgcolour(AJB_BLACK);
 
    return;
}