#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;
|
};
|
|
|
};
|