예제 #1
0
void CGraphPanel::SetWorldCoords(double _x1, double _x2, double _y1, double _y2, BOOL bRedraw)
{
    if (_x1 != GetX1() || _x2 != GetX2() || _y1 != GetY1() || _y2 != GetY2())
    {
	InitCoords(_x1, _x2, _y1, _y2);
	if (vruler != NULL)
	{
	    vruler->SetMinMax(_y1, _y2, FALSE);
	    if (bRedraw)
	    {
		vruler->RedrawWindow();
	    };
	};
	if (hruler != NULL)
	{
	    hruler->SetMinMax(_x1, _x2, FALSE);
	    if (bRedraw)
	    {
		hruler->RedrawWindow();
	    };
	};
	if (bRedraw)
	{
	    UpdateGraphWindow(NULL);
	};
    };
}
예제 #2
0
파일: pr_02_1.c 프로젝트: juannnesss/MC
void SetupJob ()
{
    AllocArrays ();
    stepCount = 0;
    InitCoords ();
    InitVels ();
    InitAccels ();
    AccumProps (0);
}
예제 #3
0
파일: pr_14_2.c 프로젝트: mfer/simula
void SetupJob ()
{
  AllocArrays ();
  InitCoords ();
  InitVels ();
  timeNow = nextSumTime = 0.;
  collCount = crossCount = 0.;
  StartRun ();
  ScheduleEvent (0, MOL_LIMIT + 6, nextSumTime);
  InitFreePath ();
}
예제 #4
0
void SetupJob ()
{
  AllocArrays ();
  DefineMol ();
  stepCount = 0;
  InitCoords ();
  InitVels ();
  InitAccels ();
  InitAngCoords ();
  InitAngVels ();
  InitAngAccels ();
  AccumProps (0);
}
예제 #5
0
void CGraphPanel::OnSize(UINT nType, int cx, int cy) 
{
    InitCoords(GetX1(), GetX2(), GetY1(), GetY2());

    CWnd::OnSize(nType, cx, cy);

    if(offscreen)
    {// update offscreen 
	CRect r;	
	GetClientRect(&r);
	CSize s = r.Size();
	offscreen->ResizeDib( s.cx, s.cy );
    }
}
예제 #6
0
파일: pr_13_1.c 프로젝트: qnu/mdoch
void SetupJob ()
{
  AllocArrays ();
  InitRand (randSeed);
  stepCount = 0;
  InitCoords ();
  InitVels ();
  InitAccels ();
  InitAngCoords ();
  InitAngVels ();
  InitAngAccels ();
  AccumProps (0);
  countRdf = 0;
}
예제 #7
0
void Beam::FilterList( ListOfObjects *childList )
{
    bool firstNoteGrace = false;
    // We want to keep only notes and rest
    // Eventually, we also need to filter out grace notes properly (e.g., with sub-beams)
    ListOfObjects::iterator iter = childList->begin();

    while ( iter != childList->end()) {
        if ( !(*iter)->IsLayerElement() ) {
            // remove anything that is not an LayerElement (e.g. Verse, Syl, etc)
            iter = childList->erase( iter );
            continue;
        }
        LayerElement *currentElement = dynamic_cast<LayerElement*>(*iter);
        assert( currentElement );
        if ( !currentElement->HasInterface(INTERFACE_DURATION) )
        {
            // remove anything that has not a DurationInterface
            iter = childList->erase( iter );
        } else {
            // Drop notes that are signaled as grace notes
            Note *n = dynamic_cast<Note*>(currentElement);

            if (n) {
                // if we are at the beginning of the beam
                // and the note is cueSize
                // assume all the beam is of grace notes
                if (childList->begin() == iter) {
                    if (n->HasGrace())
                        firstNoteGrace = true;
                }

                // if the first note in beam was NOT a grace
                // we have grace notes embedded in a beam
                // drop them
                if ( !firstNoteGrace && n->HasGrace() == true)
                    iter = childList->erase( iter );
                else
                    iter++;

            } else {
                // if it is a Rest, do not drop
                iter++;
            }
        }
    }

    InitCoords( childList );
}
예제 #8
0
파일: pr_15_1.c 프로젝트: qnu/mdoch
void SetupJob ()
{
  SetupFiles ();
  AllocArrays ();
  InitCoords ();
  InitVels ();
  timeNow = nextSumTime = 0.;
  collCount = crossCount = 0.;
  countGrid = 0;
  nextSnapTime = intervalGrid;
  StartRun ();
  GridAverage (0);
  ScheduleEvent (0, MOL_LIMIT + 6, nextSumTime);
  ScheduleEvent (0, MOL_LIMIT + 7, nextSnapTime);
}
예제 #9
0
파일: ftrem.cpp 프로젝트: rism-ch/verovio
void FTrem::FilterList(ListOfObjects *childList)
{
    ListOfObjects::iterator iter = childList->begin();

    while (iter != childList->end()) {
        if (!(*iter)->Is(NOTE) && !(*iter)->Is(CHORD)) {
            // remove anything that is not an LayerElement (e.g. Verse, Syl, etc)
            iter = childList->erase(iter);
            continue;
        }
        // also remove notes within chords
        if ((*iter)->Is(NOTE)) {
            Note *note = dynamic_cast<Note *>(*iter);
            assert(note);
            if (note->IsChordTone()) {
                iter = childList->erase(iter);
                continue;
            }
        }
        ++iter;
    }

    InitCoords(childList);
}