#include "global.h"#include "../vmisc/def.h"#include <QGraphicsItem>#include <QGraphicsScene>#include <QGraphicsView>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 |
| QColor correctColor | ( | const QGraphicsItem * | item, |
| const QColor & | color | ||
| ) |
Definition at line 80 of file global.cpp.
References SCASSERT.
Referenced by VGraphicsSimpleTextItem::getTextBrushColor(), VAbstractSpline::paint(), DoubleLinePointTool::paint(), VToolLinePoint::paint(), VToolLine::paint(), VControlPointSpline::paint(), VSimpleCurve::ScalePenWidth(), and VScenePoint::setPointPen().
| QPainterPath ItemShapeFromPath | ( | const QPainterPath & | path, |
| const QPen & | pen | ||
| ) |
Definition at line 140 of file global.cpp.
Referenced by VAbstractSpline::shape(), PatternPieceTool::shape(), and VCurvePathItem::shape().
| QRectF PointRect | ( | qreal | radius | ) |
Definition at line 95 of file global.cpp.
Referenced by Visualization::initPointItem(), IntersectCirclesVisual::RefreshGeometry(), IntersectCircleTangentVisual::RefreshGeometry(), VisToolPointOfContact::RefreshGeometry(), scaleCircleSize(), and scaleRectSize().
| void scaleCircleSize | ( | QGraphicsEllipseItem * | item, |
| qreal | scale | ||
| ) |
Definition at line 114 of file global.cpp.
References PointRect(), scaledRadius(), and SCASSERT.
Referenced by VScaledEllipse::paint().
| qreal scaledRadius | ( | qreal | scale | ) |
Definition at line 103 of file global.cpp.
References defPointRadiusPixel.
Referenced by VisToolMove::RefreshGeometry(), VScenePoint::refreshLeader(), scaleCircleSize(), scaleRectSize(), VControlPointSpline::setCtrlLine(), and DialogRotation::ShowDialog().
| void scaleRectSize | ( | QGraphicsRectItem * | item, |
| qreal | scale | ||
| ) |
Definition at line 122 of file global.cpp.
References PointRect(), scaledRadius(), and SCASSERT.
Referenced by SceneRect::paint().
| qreal scaleWidth | ( | qreal | width, |
| qreal | scale | ||
| ) |
Definition at line 130 of file global.cpp.
Referenced by PatternPieceTool::InitInternalPaths(), VAbstractSpline::paint(), PatternPieceTool::paint(), VToolLine::paint(), VToolInternalPath::paint(), VScaledLine::paint(), ArrowedLineItem::paint(), VScaledEllipse::paint(), VCurvePathItem::paint(), VCurvePathItem::ScalePenWidth(), VSimpleCurve::ScalePenWidth(), VScenePoint::setPointPen(), SceneRect::setRectPen(), VAbstractSpline::shape(), and VCurvePathItem::shape().
| qreal sceneScale | ( | QGraphicsScene * | scene | ) |
Definition at line 63 of file global.cpp.
Referenced by PatternPieceTool::InitInternalPaths(), PatternPieceTool::itemChange(), VGraphicsSimpleTextItem::itemChange(), VAbstractSpline::paint(), PatternPieceTool::paint(), VToolLine::paint(), VToolInternalPath::paint(), VScaledLine::paint(), ArrowedLineItem::paint(), VScaledEllipse::paint(), SceneRect::paint(), VCurvePathItem::paint(), VGraphicsSimpleTextItem::paint(), VScenePoint::paint(), VisToolMove::RefreshGeometry(), VScenePoint::refreshLeader(), VCurvePathItem::ScalePenWidth(), VSimpleCurve::ScalePenWidth(), VGraphicsSimpleTextItem::scalePosition(), VControlPointSpline::setCtrlLine(), VAbstractSpline::shape(), VCurvePathItem::shape(), and DialogRotation::ShowDialog().
| const qreal defPointRadiusPixel = (2. / 25.4) * PrintDPI |
Definition at line 59 of file global.cpp.
Referenced by VisToolSplinePath::Creating(), Visualization::initPointItem(), VisToolRotation::RefreshGeometry(), VisToolSpline::RefreshGeometry(), scaledRadius(), DialogCurveIntersectAxis::ShowDialog(), DialogEndLine::ShowDialog(), and DialogLineIntersectAxis::ShowDialog().
| const qreal widthHairLine = widthMainLine/3.0 |
Definition at line 61 of file global.cpp.
Referenced by VLayoutPiece::createLabelItem(), VControlPointSpline::init(), VMainGraphicsScene::InitOrigins(), VScenePoint::setPointPen(), SceneRect::setRectPen(), and VScenePoint::VScenePoint().
| const qreal widthMainLine = (1.2 / 25.4) * PrintDPI |
Definition at line 60 of file global.cpp.
Referenced by MainWindowsNoGUI::exportPDF(), MainWindowsNoGUI::IsLayoutGrayscale(), ArrowedLineItem::paint(), VScaledEllipse::paint(), MainWindowsNoGUI::PrintPages(), MainWindowsNoGUI::RestorePaper(), VCurvePathItem::ScalePenWidth(), VSimpleCurve::ScalePenWidth(), MainWindowsNoGUI::ScenePreview(), VScenePoint::setPointPen(), and SceneRect::setRectPen().