ReactOS 0.4.15-dev-7677-g8209aa5
BezierTool Struct Reference
Inheritance diagram for BezierTool:
Collaboration diagram for BezierTool:

Public Member Functions

void OnDrawOverlayOnImage (HDC hdc)
 
void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
 
BOOL OnMouseMove (BOOL bLeftButton, LONG &x, LONG &y) override
 
BOOL OnButtonUp (BOOL bLeftButton, LONG &x, LONG &y) override
 
void OnEndDraw (BOOL bCancel) override
 
void OnSpecialTweak (BOOL bMinus) override
 
- Public Member Functions inherited from ToolBase
 ToolBase ()
 
virtual ~ToolBase ()
 
virtual void OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
 
virtual BOOL OnMouseMove (BOOL bLeftButton, LONG &x, LONG &y)
 
virtual BOOL OnButtonUp (BOOL bLeftButton, LONG &x, LONG &y)
 
virtual void OnDrawOverlayOnImage (HDC hdc)
 
virtual void OnDrawOverlayOnCanvas (HDC hdc)
 
virtual void OnSpecialTweak (BOOL bMinus)
 
virtual void OnEndDraw (BOOL bCancel)
 
void beginEvent ()
 
void endEvent ()
 
void reset ()
 

Public Attributes

BOOL m_bLeftButton = FALSE
 
- Public Attributes inherited from ToolBase
HDC m_hdc
 
COLORREF m_fg
 
COLORREF m_bg
 

Additional Inherited Members

- Static Public Member Functions inherited from ToolBase
static ToolBasecreateToolObject (TOOLTYPE type)
 

Detailed Description

Definition at line 907 of file mouse.cpp.

Member Function Documentation

◆ OnButtonDown()

void BezierTool::OnButtonDown ( BOOL  bLeftButton,
LONG  x,
LONG  y,
BOOL  bDoubleClick 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 929 of file mouse.cpp.

930 {
931 m_bLeftButton = bLeftButton;
932
933 if (s_cPoints == 0)
934 {
935 pushToPoints(x, y);
936 pushToPoints(x, y);
937 }
938 else
939 {
940 s_pPoints[s_cPoints - 1] = { x, y };
941 }
942
944 }
static LPPOINT s_pPoints
Definition: mouse.cpp:16
static void pushToPoints(LONG x, LONG y)
Definition: mouse.cpp:143
static SIZE_T s_cPoints
Definition: mouse.cpp:12
void NotifyImageChanged()
Definition: history.cpp:23
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
ImageModel imageModel
Definition: history.cpp:11
BOOL m_bLeftButton
Definition: mouse.cpp:909

◆ OnButtonUp()

BOOL BezierTool::OnButtonUp ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 954 of file mouse.cpp.

955 {
956 if (s_cPoints >= 4)
957 {
959 return TRUE;
960 }
961 pushToPoints(x, y);
963 return TRUE;
964 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
void OnEndDraw(BOOL bCancel) override
Definition: mouse.cpp:966

◆ OnDrawOverlayOnImage()

void BezierTool::OnDrawOverlayOnImage ( HDC  hdc)
inlinevirtual

Reimplemented from ToolBase.

Definition at line 911 of file mouse.cpp.

912 {
914 switch (s_cPoints)
915 {
916 case 2:
919 break;
920 case 3:
922 break;
923 case 4:
925 break;
926 }
927 }
ToolsModel toolsModel
Definition: toolsmodel.cpp:10
int GetLineWidth() const
Definition: toolsmodel.cpp:46
void Bezier(HDC hdc, POINT p1, POINT p2, POINT p3, POINT p4, COLORREF color, int thickness)
Definition: drawing.cpp:93
HDC hdc
Definition: main.c:9
Definition: ncftp.h:79
COLORREF m_fg
Definition: toolsmodel.h:44
COLORREF m_bg
Definition: toolsmodel.h:44
_In_ ULONG _In_ ULONG rgb
Definition: winddi.h:3521
DWORD COLORREF
Definition: windef.h:300

Referenced by OnEndDraw().

◆ OnEndDraw()

void BezierTool::OnEndDraw ( BOOL  bCancel)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 966 of file mouse.cpp.

967 {
968 if (!bCancel && s_cPoints > 1)
969 {
970 // FIXME: I couldn't calculate boundary rectangle from Bezier curve
973 }
974 ToolBase::OnEndDraw(bCancel);
975 }
void PushImageForUndo()
Definition: history.cpp:127
void OnDrawOverlayOnImage(HDC hdc)
Definition: mouse.cpp:911
HDC m_hdc
Definition: toolsmodel.h:43
virtual void OnEndDraw(BOOL bCancel)
Definition: mouse.cpp:125

Referenced by OnButtonUp().

◆ OnMouseMove()

BOOL BezierTool::OnMouseMove ( BOOL  bLeftButton,
LONG x,
LONG y 
)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 946 of file mouse.cpp.

947 {
948 if (s_cPoints > 0)
949 s_pPoints[s_cPoints - 1] = { x, y };
951 return TRUE;
952 }

◆ OnSpecialTweak()

void BezierTool::OnSpecialTweak ( BOOL  bMinus)
inlineoverridevirtual

Reimplemented from ToolBase.

Definition at line 977 of file mouse.cpp.

978 {
980 }
void MakeLineThickerOrThinner(BOOL bThinner)
Definition: toolsmodel.cpp:82

Member Data Documentation

◆ m_bLeftButton

BOOL BezierTool::m_bLeftButton = FALSE

Definition at line 909 of file mouse.cpp.

Referenced by OnButtonDown(), and OnDrawOverlayOnImage().


The documentation for this struct was generated from the following file: