public void PaintFingerTraces(WacomMTFingerCollection fingerCollection) { _fingerCollection = fingerCollection; if (this.Visible) { panel1.Invalidate(); } }
public void PaintFingerTraces(WacomMTFingerCollection fingerCollection) { _fingerCollection = fingerCollection; if(this.Visible) { panel1.Invalidate(); } }
public static bool AllFingersUp(ref WacomMTFingerCollection fingercollection) { for (uint i = 0; i < fingercollection.FingerCount; i++) { if (fingercollection.GetFingerByIndex(i).TouchState != WacomMTFingerState.WMTFingerStateUp) { return(false); } } return(true); }
public static bool AllFingersUp(ref WacomMTFingerCollection fingercollection) { for(uint i=0; i< fingercollection.FingerCount; i++) { if(fingercollection.GetFingerByIndex(i).TouchState != WacomMTFingerState.WMTFingerStateUp) { return false; } } return true; }
private void DoSendMidiMessage(ref WacomMTFingerCollection fingercollection) { //if we decided to skip early frames if (skipEarlyFrames && fingercollection.FrameNumber >= framesToSkip) { if (!TouchHelper.AllFingersUp(ref fingercollection) && fingercollection.FingerCount <= 5) { //X value for messages MidiFingerMessage fmX = mtouchMessages[fingercollection.FingerCount - 1].MessageX; int val = (int)(((fingercollection.GetFingerByIndex(0).X * 10000) * fmX.MaxValue) / 10000) + fmX.MinValue; SendMidiMessage(fmX.MidiCtrlr, val, fmX.MidiChannel); //Y value for messages MidiFingerMessage fmY = mtouchMessages[fingercollection.FingerCount - 1].MessageY; val = (int)(fmY.MaxValue - (((fingercollection.GetFingerByIndex(0).Y * 10000) * fmY.MaxValue) / 10000) + fmY.MinValue); SendMidiMessage(fmY.MidiCtrlr, val, fmY.MidiChannel); } } }
public UInt32 DoFingerDataUpdateCallback(IntPtr packet_I, IntPtr userData_I) { try { // Recover the finger collection sent back. WacomMTFingerCollection fingerCollection = CMemUtils.PtrToStructure <WacomMTFingerCollection>(packet_I); // Recover the user data sent back. mUserDataStringReturned = CMemUtils.PtrToManagedString(userData_I); Invoke(mUpdateRealTimeLabel, fingerCollection); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } return(0); }
private void DoUpdateGraphicsControl(ref WacomMTFingerCollection fingercollection) { tabletPointer1.PaintFingerTraces(fingercollection); }