Seamly2D
Code documentation
global.cpp File Reference
#include "global.h"
#include "../vmisc/def.h"
#include <QGraphicsItem>
#include <QGraphicsScene>
#include <QGraphicsView>
Include dependency graph for global.cpp:

Go to the source code of this file.

Functions

qreal sceneScale (QGraphicsScene *scene)
 
QColor correctColor (const QGraphicsItem *item, const QColor &color)
 
QRectF PointRect (qreal radius)
 
qreal scaledRadius (qreal scale)
 
void scaleCircleSize (QGraphicsEllipseItem *item, qreal scale)
 
void scaleRectSize (QGraphicsRectItem *item, qreal scale)
 
qreal scaleWidth (qreal width, qreal scale)
 
QPainterPath ItemShapeFromPath (const QPainterPath &path, const QPen &pen)
 

Variables

const qreal defPointRadiusPixel = (2. / 25.4) * PrintDPI
 
const qreal widthMainLine = (1.2 / 25.4) * PrintDPI
 
const qreal widthHairLine = widthMainLine/3.0
 

Function Documentation

◆ correctColor()

◆ ItemShapeFromPath()

QPainterPath ItemShapeFromPath ( const QPainterPath &  path,
const QPen &  pen 
)

◆ PointRect()

◆ scaleCircleSize()

void scaleCircleSize ( QGraphicsEllipseItem *  item,
qreal  scale 
)

Definition at line 114 of file global.cpp.

References PointRect(), scaledRadius(), and SCASSERT.

Referenced by VScaledEllipse::paint().

◆ scaledRadius()

◆ scaleRectSize()

void scaleRectSize ( QGraphicsRectItem *  item,
qreal  scale 
)

Definition at line 122 of file global.cpp.

References PointRect(), scaledRadius(), and SCASSERT.

Referenced by SceneRect::paint().

◆ scaleWidth()

◆ sceneScale()

Variable Documentation

◆ defPointRadiusPixel

◆ widthHairLine

◆ widthMainLine