SDC C-Project CF Review 프로그램
LYW
2021-07-08 9cbd9e554f9956b3b945b51602f1d4a3fa0353e1
ReviewHistory/include/akCore/akStructRect.h
»õ ÆÄÀÏ
@@ -0,0 +1,59 @@
#pragma once
#include "akCoreLinker.h"
namespace akCore
{
   class AKCORE_DLLSPEC khRect
   {
   public:
      khRect(void);
      khRect(int l, int t, int r, int b);
      virtual ~khRect(void);
      void set(int l, int t, int r, int b);
      khRect& operator=(const khRect& rect);
      inline int getWidth(){return right-left;};
      inline int getHeight(){return bottom-top;};
      inline int getCenter(){return int(left+(right-left)/2.0);};
      inline int getVCenter(){return int(top+(bottom-top)/2.0);};
      void setAlign(); //작은값이 ì™¼ìª½, ìœ„, í°ê°’이 ì˜¤ë¥¸ìª½ ì•„래로 ê°€ê²Œ í•œë‹¤.
      bool getCheckAreaIn(double x, double y); //사각형 ì˜ì—­ì— x,y포인트가 ìžˆëŠ”ì§€ ê²€ì‚¬
      bool getCheckWidthIn(double p1); //x포인트 ê°€ìš´ë° ì ì´ ìžˆëŠ”ì§€ ê²€ì‚¬
      bool getCheCakeightIn(double p1); //y포인트 ê°€ìš´ë° ì ì´ ìžˆëŠ”ì§€ ê²€ì‚¬
   public:
      int left, top, right, bottom;
   };
   class AKCORE_DLLSPEC khRect4d
   {
   public:
      khRect4d(void);
      khRect4d(double l, double t, double r, double b);
      virtual ~khRect4d(void);
      void set(double l, double t, double r, double b);
      khRect4d& operator=(const khRect4d& rect);
      inline double getWidth(){return right-left;};
      inline double getHeight(){return bottom-top;};
      inline double getCenter(){return left+(right-left)/2.0;};
      inline double getVCenter(){return top+(bottom-top)/2.0;};
      void setAlign(); //작은값이 ì™¼ìª½, ìœ„, í°ê°’이 ì˜¤ë¥¸ìª½ ì•„래로 ê°€ê²Œ í•œë‹¤.
      bool getCheckAreaIn(double x, double y); //사각형 ì˜ì—­ì— x,y포인트가 ìžˆëŠ”ì§€ ê²€ì‚¬
      bool getCheckWidthIn(double p1); //x포인트 ê°€ìš´ë° ì ì´ ìžˆëŠ”ì§€ ê²€ì‚¬
      bool getCheCakeightIn(double p1); //y포인트 ê°€ìš´ë° ì ì´ ìžˆëŠ”ì§€ ê²€ì‚¬
   public:
      double left, top, right, bottom;
   };
};