Canvas.cs 957 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using CommonUI.Gemo;
  5. namespace CommonUI.Display
  6. {
  7. // ------------------------------------------------------------------------------------------
  8. // -by zhangyifei
  9. // ------------------------------------------------------------------------------------------
  10. public abstract class Canvas
  11. {
  12. public readonly Point2D Pointer = new Point2D();
  13. public abstract void onUpdate();
  14. public abstract void onPaint(Graphics g);
  15. virtual public bool onPointerPressed(float x, float y) { return false; }
  16. virtual public bool onPointerReleased(float x, float y) { return false; }
  17. virtual public bool onPointerDragged(float x, float y) { return false; }
  18. virtual public bool IsHandlelByStage(float x,float y){return false;}
  19. abstract public void onResumeApp();
  20. abstract public void onPauseApp();
  21. }
  22. }