53 return (
abs(
x1 -
x0) <= cxThreshold) && (
abs(
y1 -
y0) <= cyThreshold);
63 ptMax = {
max(
x, ptMax.x),
max(
y, ptMax.y) };
70 CRect rc(ptMin, ptMax);
220#define THRESHOULD_DEG 15
230 double radian =
atan2((
double)
dy, (
double)
dx);
621 rgbColor =
RGB(255, 255, 255);
668 if (oldZoom != newZoom)
1180 ATLTRACE(
"ToolsModel::OnEndDraw(%d)\n", bCancel);
1253 strSize.
Format(
L"%ld x %ld", xRel, yRel);
1267 strSize.
Format(
L"%ld x %ld", xRel, yRel);
valarray< _Tp > atan2(const valarray< _Tp > &__x, const valarray< _Tp > &__y)
#define ATLTRACE(format,...)
static SIZE_T s_maxPoints
void BuildMaskFromPoints()
static POINT s_staticPoints[512]
BOOL nearlyEqualPoints(INT x0, INT y0, INT x1, INT y1)
void regularize(LONG x0, LONG y0, LONG &x1, LONG &y1)
static void RestrictDrawDirection(DIRECTION dir, LONG x0, LONG y0, LONG &x1, LONG &y1)
static DIRECTION GetDirection(LONG x0, LONG y0, LONG x1, LONG y1)
void ShiftPoints(INT dx, INT dy)
@ DIRECTION_DIAGONAL_RIGHT_UP
@ DIRECTION_DIAGONAL_RIGHT_DOWN
void getBoundaryOfPoints(RECT &rcBoundary, SIZE_T cPoints, const POINT *pPoints)
static CHeapPtr< POINT, CLocalAllocator > s_dynamicPoints
static void pushToPoints(LONG x, LONG y)
void roundTo8Directions(LONG x0, LONG y0, LONG &x1, LONG &y1)
RegistrySettings registrySettings
SelectionModel selectionModel
CTextEditWindow textEditWindow
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
CCanvasWindow canvasWindow
void __cdecl Format(UINT nFormatID,...)
VOID ImageToCanvas(POINT &pt)
VOID GetImageRect(RECT &rc)
VOID getNewZoomRect(CRect &rcView, INT newZoom, CPoint ptTarget)
VOID zoomTo(INT newZoom, LONG left=0, LONG top=0)
VOID TrackPopupMenu(POINT ptScreen, INT iSubMenu)
void InflateRect(int x, int y) noexcept
BOOL PtInRect(POINT point) const noexcept
void NormalizeRect() noexcept
void SetRect(int x1, int y1, int x2, int y2) noexcept
int Width() const noexcept
int Height() const noexcept
BOOL IsRectEmpty() const noexcept
BOOL GetEditRect(LPRECT prc) const
void InvalidateEditRect()
HWND Create(HWND hwndParent)
void ValidateEditRect(LPCRECT prc OPTIONAL)
void NotifyImageChanged()
void Clamp(POINT &pt) const
COLORREF GetBgColor() const
void SetFgColor(COLORREF newColor)
void SetBgColor(COLORREF newColor)
COLORREF GetFgColor() const
void DrawBackground(HDC hDCImage, COLORREF crBg)
void DrawSelection(HDC hDCImage, COLORREF crBg, BOOL bBgTransparent, const CRect &rc, HBITMAP hbm)
void drawFrameOnCanvas(HDC hCanvasDC)
void Dragging(HITTEST hit, POINT pt)
void setMask(const CRect &rc, HBITMAP hbmMask)
HITTEST hitTest(POINT ptCanvas)
void SetRectFromPoints(const POINT &ptFrom, const POINT &ptTo)
void StretchSelection(BOOL bShrink)
DWORD WINAPI GetTickCount(VOID)
void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2)
void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, COLORREF color, int thickness)
void Ellp(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style)
void Poly(HDC hdc, POINT *lpPoints, int nCount, COLORREF fg, COLORREF bg, int thickness, int style, BOOL closed, BOOL inverted)
void DrawXorRect(HDC hdc, const RECT *prc)
void RRect(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, int thickness, int style)
void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius)
void Erase(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG radius)
void Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r)
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ long __cdecl labs(_In_ long x)
void __cdecl srand(_In_ unsigned int _Seed)
PaletteModel paletteModel
BOOL Polygon(CONST PPOINT UnsafePoints, int Count, int polyFillMode)
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
void OnDrawOverlayOnImage(HDC hdc) override
BOOL OnButtonUp(BOOL bLeftButton, LONG &x, LONG &y) override
BOOL OnMouseMove(BOOL bLeftButton, LONG &x, LONG &y) override
void UpdatePoint(LONG x, LONG y)
void OnEndDraw(BOOL bCancel) override
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ ULONG _In_ ULONG rgb
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
HGDIOBJ WINAPI GetStockObject(_In_ int)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define SW_SHOWNOACTIVATE
SHORT WINAPI GetAsyncKeyState(_In_ int)
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)