Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_tool_crop.cc File Reference
#include "kis_tool_crop.h"
#include <QCheckBox>
#include <QObject>
#include <QPainter>
#include <QPen>
#include <QRect>
#include <QMenu>
#include <kis_debug.h>
#include <klocalizedstring.h>
#include <ksharedconfig.h>
#include <KoCanvasBase.h>
#include <kis_global.h>
#include <kis_painter.h>
#include <kis_cursor.h>
#include <kis_image.h>
#include <kis_undo_adapter.h>
#include <KoPointerEvent.h>
#include <kis_selection.h>
#include <kis_layer.h>
#include <kis_canvas2.h>
#include <KisViewManager.h>
#include <kis_floating_message.h>
#include <kis_group_layer.h>
#include <kis_resources_snapshot.h>
#include <kundo2command.h>
#include <kis_crop_saved_extra_data.h>

Go to the source code of this file.

Classes

struct  DecorationLine
 

Macros

#define BORDER_LINE_WIDTH   0
 
#define DECORATION_COUNT   5
 
#define HALF_BORDER_LINE_WIDTH   0
 
#define HANDLE_BORDER_LINE_WIDTH   1
 
#define OUTSIDE_CROP_ALPHA   200
 

Variables

DecorationLine decors [20]
 
const int decorsIndex [DECORATION_COUNT] = {0,4,12,18,20}
 

Macro Definition Documentation

◆ BORDER_LINE_WIDTH

#define BORDER_LINE_WIDTH   0

Definition at line 406 of file kis_tool_crop.cc.

◆ DECORATION_COUNT

#define DECORATION_COUNT   5

Definition at line 93 of file kis_tool_crop.cc.

◆ HALF_BORDER_LINE_WIDTH

#define HALF_BORDER_LINE_WIDTH   0

Definition at line 407 of file kis_tool_crop.cc.

◆ HANDLE_BORDER_LINE_WIDTH

#define HANDLE_BORDER_LINE_WIDTH   1

Definition at line 408 of file kis_tool_crop.cc.

◆ OUTSIDE_CROP_ALPHA

#define OUTSIDE_CROP_ALPHA   200

Definition at line 420 of file kis_tool_crop.cc.

Variable Documentation

◆ decors

DecorationLine decors[20]
Initial value:
=
{
{QPointF(0.0, 0.45/0.35),QPointF(1.0, 0.45/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
{QPointF(0.2, 0.05/0.35),QPointF(0.8, 0.05/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
{QPointF(0.2, 0.40/0.35),QPointF(0.8, 0.40/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
{QPointF(0.25, 0.07/0.35),QPointF(0.75, 0.07/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
{QPointF(0.25, 0.38/0.35),QPointF(0.75, 0.38/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
{QPointF(0.35/0.45, 0.0),QPointF(0.35/0.45, 1.0), DecorationLine::Height, DecorationLine::Height, DecorationLine::Height, DecorationLine::Height},
}

Definition at line 62 of file kis_tool_crop.cc.

63{
64 //thirds
69
70 //fifths
79
80 // Passport photo
81 {QPointF(0.0, 0.45/0.35),QPointF(1.0, 0.45/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
82 {QPointF(0.2, 0.05/0.35),QPointF(0.8, 0.05/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
83 {QPointF(0.2, 0.40/0.35),QPointF(0.8, 0.40/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
84 {QPointF(0.25, 0.07/0.35),QPointF(0.75, 0.07/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
85 {QPointF(0.25, 0.38/0.35),QPointF(0.75, 0.38/0.35), DecorationLine::Width, DecorationLine::Width, DecorationLine::Width, DecorationLine::Width},
86 {QPointF(0.35/0.45, 0.0),QPointF(0.35/0.45, 1.0), DecorationLine::Height, DecorationLine::Height, DecorationLine::Height, DecorationLine::Height},
87
88 //Crosshair
91};

◆ decorsIndex

const int decorsIndex[DECORATION_COUNT] = {0,4,12,18,20}

Definition at line 94 of file kis_tool_crop.cc.

94{0,4,12,18,20};