Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.5 KiB

  1. // frame.h
  2. #ifndef __INCLUDE_FRAME
  3. #define __INCLUDE_FRAME
  4. #ifdef __cplusplus
  5. extern "C"
  6. {
  7. #endif
  8. typedef POINT XY;
  9. typedef struct tagFRAME
  10. {
  11. void *pvData; // Recognizer specific private data
  12. STROKEINFO info; // Physical info about ink (Penwin.h)
  13. UINT csmoothxy; // points in smoothed strokes
  14. XY *rgrawxy; // tablet coords of all the points in the stroke
  15. XY *rgsmoothxy; // array of points after smoothing
  16. RECT rect; // bounding box of this stroke
  17. int iframe; // pos of this frame in linked list of glyphs
  18. } FRAME;
  19. FRAME *NewFRAME(void);
  20. void DestroyFRAME(FRAME *self);
  21. RECT *RectFRAME(FRAME *self);
  22. BOOL IsSafeForAdd(int a, int b);
  23. BOOL IsSafeForMult(int a, int b);
  24. BOOL TranslateFrame (FRAME *pFrame, int dx, int dy);
  25. FRAME *copyFRAME(FRAME *pFrame);
  26. #define SetIFrameFRAME(frame,i) ((frame)->iframe = (i))
  27. #define IFrameFRAME(frame) ((frame)->iframe)
  28. #define DeInitRectFRAME(frame) ((frame)->rect.left = -1)
  29. #define IsVisibleSTROKE(info) (((info)->wPdk) & PDK_TIPMASK)
  30. #define IsVisibleFRAME(frame) (IsVisibleSTROKE(&(frame)->info))
  31. #define RgrawxyFRAME(frame) ((frame)->rgrawxy)
  32. #define CrawxyFRAME(frame) ((frame)->info.cPnt)
  33. #define RawxyAtFRAME(frame,i) ((frame)->rgrawxy[i])
  34. #define LppointFRAME(frame) ((LPPOINT)(frame)->rgrawxy)
  35. #define CpointFRAME(frame) ((frame)->info.cPnt)
  36. #define CpointSmoothFRAME(frame) ((frame)->csmoothxy)
  37. #define LpframeinfoFRAME(frame) (&(frame)->info)
  38. #ifdef __cplusplus
  39. };
  40. #endif
  41. #endif //__INCLUDE_FRAME