Ejemplo n.º 1
0
/*
 * UpdateZTrkMark updates appropriate marks showing the whereabouts of
 * the zoomed traces.
 */
void UpdateZTrkMark(int itrc, Trace *trc, Track *trk)
{
    int x1,x2;

    if (trc->wave && ZoomWindowMapped
	&& trc->zaxis.hs!=0) { /* make sure get scaled */
	x1= indexToCoord(&trc->axis, trc->zaxis.ix1, 1);
	x2= indexToCoord(&trc->axis, trc->zaxis.ix2, 1);
	if ((x2-x1) < 16) {
	    /* draw a box */
	    XDrawRectangle(theDisp, trk->xwin, trk->ovrGC,
			   x1, 4, (x2-x1),	trk->height-8);
	}else {
	    if (x1>=0)	/* draw a '[' */
		drawBracket(trk->xwin, trk->ovrGC, x1, 4,
			    trk->height-4, LEFT_BRACKET);
	    if (x2<=trk->width)	/* draw a ']' */
		drawBracket(trk->xwin, trk->ovrGC, x2, 4,
			    trk->height-4, RIGHT_BRACKET);
	}
	XFlush(theDisp);
    }
}
Ejemplo n.º 2
0
const GameCore::Card& GameCore::getCardAt(int index) const
{
    return getCardAt(indexToCoord(index));
}
Ejemplo n.º 3
0
bool GameCore::isValidIndex(int index) const
{
    return isValidCoord(indexToCoord(index));
}
Ejemplo n.º 4
0
bool GameCore::checkMatch(int index1, int index2)
{
    return checkMatch(indexToCoord(index1), indexToCoord(index2));
}