ReactOS 0.4.15-dev-8138-g1e75ea8
toolsmodel.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ToolBase
 
class  ToolsModel
 

Enumerations

enum  TOOLTYPE {
  TOOL_FREESEL = 1 , TOOL_RECTSEL = 2 , TOOL_RUBBER = 3 , TOOL_FILL = 4 ,
  TOOL_COLOR = 5 , TOOL_ZOOM = 6 , TOOL_PEN = 7 , TOOL_BRUSH = 8 ,
  TOOL_AIRBRUSH = 9 , TOOL_TEXT = 10 , TOOL_LINE = 11 , TOOL_BEZIER = 12 ,
  TOOL_RECT = 13 , TOOL_SHAPE = 14 , TOOL_ELLIPSE = 15 , TOOL_RRECT = 16 ,
  TOOL_MAX = TOOL_RRECT
}
 
enum  BrushStyle { BrushStyleRound , BrushStyleSquare , BrushStyleForeSlash , BrushStyleBackSlash }
 

Functions

static int Zoomed (int xy)
 
static int UnZoomed (int xy)
 
static void Zoomed (POINT &pt)
 
static void Zoomed (RECT &rc)
 
static void UnZoomed (POINT &pt)
 
static void UnZoomed (RECT &rc)
 

Variables

ToolsModel toolsModel
 

Enumeration Type Documentation

◆ BrushStyle

Enumerator
BrushStyleRound 
BrushStyleSquare 
BrushStyleForeSlash 
BrushStyleBackSlash 

Definition at line 31 of file toolsmodel.h.

32{
37};
@ BrushStyleForeSlash
Definition: toolsmodel.h:35
@ BrushStyleRound
Definition: toolsmodel.h:33
@ BrushStyleBackSlash
Definition: toolsmodel.h:36
@ BrushStyleSquare
Definition: toolsmodel.h:34

◆ TOOLTYPE

Enumerator
TOOL_FREESEL 
TOOL_RECTSEL 
TOOL_RUBBER 
TOOL_FILL 
TOOL_COLOR 
TOOL_ZOOM 
TOOL_PEN 
TOOL_BRUSH 
TOOL_AIRBRUSH 
TOOL_TEXT 
TOOL_LINE 
TOOL_BEZIER 
TOOL_RECT 
TOOL_SHAPE 
TOOL_ELLIPSE 
TOOL_RRECT 
TOOL_MAX 

Definition at line 10 of file toolsmodel.h.

11{
12 TOOL_FREESEL = 1,
13 TOOL_RECTSEL = 2,
14 TOOL_RUBBER = 3,
15 TOOL_FILL = 4,
16 TOOL_COLOR = 5,
17 TOOL_ZOOM = 6,
18 TOOL_PEN = 7,
19 TOOL_BRUSH = 8,
20 TOOL_AIRBRUSH = 9,
21 TOOL_TEXT = 10,
22 TOOL_LINE = 11,
23 TOOL_BEZIER = 12,
24 TOOL_RECT = 13,
25 TOOL_SHAPE = 14,
26 TOOL_ELLIPSE = 15,
27 TOOL_RRECT = 16,
29};
@ TOOL_AIRBRUSH
Definition: toolsmodel.h:20
@ TOOL_COLOR
Definition: toolsmodel.h:16
@ TOOL_SHAPE
Definition: toolsmodel.h:25
@ TOOL_RUBBER
Definition: toolsmodel.h:14
@ TOOL_MAX
Definition: toolsmodel.h:28
@ TOOL_BRUSH
Definition: toolsmodel.h:19
@ TOOL_RECT
Definition: toolsmodel.h:24
@ TOOL_BEZIER
Definition: toolsmodel.h:23
@ TOOL_FILL
Definition: toolsmodel.h:15
@ TOOL_TEXT
Definition: toolsmodel.h:21
@ TOOL_PEN
Definition: toolsmodel.h:18
@ TOOL_LINE
Definition: toolsmodel.h:22
@ TOOL_FREESEL
Definition: toolsmodel.h:12
@ TOOL_ZOOM
Definition: toolsmodel.h:17
@ TOOL_ELLIPSE
Definition: toolsmodel.h:26
@ TOOL_RRECT
Definition: toolsmodel.h:27
@ TOOL_RECTSEL
Definition: toolsmodel.h:13

Function Documentation

◆ UnZoomed() [1/3]

static int UnZoomed ( int  xy)
inlinestatic

Definition at line 155 of file toolsmodel.h.

156{
157 return xy * 1000 / toolsModel.GetZoom();
158}
int GetZoom() const
Definition: toolsmodel.cpp:261
ToolsModel toolsModel
Definition: toolsmodel.cpp:10

Referenced by CCanvasWindow::CanvasToImage(), nearlyEqualPoints(), and UnZoomed().

◆ UnZoomed() [2/3]

static void UnZoomed ( POINT pt)
inlinestatic

Definition at line 170 of file toolsmodel.h.

171{
172 pt = { UnZoomed(pt.x), UnZoomed(pt.y) };
173}
#define pt(x, y)
Definition: drawing.c:79
static int UnZoomed(int xy)
Definition: toolsmodel.h:155

◆ UnZoomed() [3/3]

static void UnZoomed ( RECT rc)
inlinestatic

Definition at line 175 of file toolsmodel.h.

176{
177 rc = { UnZoomed(rc.left), UnZoomed(rc.top), UnZoomed(rc.right), UnZoomed(rc.bottom) };
178}
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306

◆ Zoomed() [1/3]

static int Zoomed ( int  xy)
inlinestatic

Definition at line 150 of file toolsmodel.h.

151{
152 return xy * toolsModel.GetZoom() / 1000;
153}

Referenced by CCanvasWindow::ImageToCanvas(), CTextEditWindow::UpdateFont(), CCanvasWindow::updateScrollRange(), and Zoomed().

◆ Zoomed() [2/3]

static void Zoomed ( POINT pt)
inlinestatic

Definition at line 160 of file toolsmodel.h.

161{
162 pt = { Zoomed(pt.x), Zoomed(pt.y) };
163}
static int Zoomed(int xy)
Definition: toolsmodel.h:150

◆ Zoomed() [3/3]

static void Zoomed ( RECT rc)
inlinestatic

Definition at line 165 of file toolsmodel.h.

166{
167 rc = { Zoomed(rc.left), Zoomed(rc.top), Zoomed(rc.right), Zoomed(rc.bottom) };
168}

Variable Documentation

◆ toolsModel

ToolsModel toolsModel
extern

Definition at line 10 of file toolsmodel.cpp.

Referenced by UnZoomed(), and Zoomed().