obj.hpp

来自「一个嵌入式系统的C代码」· HPP 代码 · 共 49 行

HPP
49
字号
//***********************************************************************//  MODULE : Obj - Class Header                                         *//  AUTHOR : Ron Chernich                                               *//  PURPOSE: Class header for geometric objects used by RCOS            *//  HISTORY:                                                            *//   18-JAN-93  First (MSC/C++ 7.00) version                            *//***********************************************************************#ifndef _RCOS_OBJ  #define _RCOS_OBJ  #include "rcos.hpp"  ////////////////  // (typically) a screen location in pixels  //  class point {  public:    INT16 x, y;                         // xy location of point    point (INT16 = 0, INT16 = 0);    point (point& pt) { x = pt.x, y = pt.y; }    ~point () {};    point& operator= (point&);    BOOL operator >= (point&);    BOOL operator <= (point&);    void MovePt (INT16, INT16);  };  ///////////////////  // an area bounded by two points  //  class rect {  public:    point ul, lr;                               // upper-left, lower-right    rect ()  {};    ~rect () {};    rect (point&, point&);    rect (point&, INT16, INT16);    rect (INT16, INT16, INT16, INT16);    BOOL InRect (point&);  };#endif/************************************ EOF ********************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?