KOSMIndoorMap
painterrenderer.cpp
53 if ((*it).payload->inSceneSpace() && m_view->viewport().intersects((*it).payload->boundingRect(view))) {
65 for (auto phase : {SceneGraphItemPayload::FillPhase, SceneGraphItemPayload::CasingPhase, SceneGraphItemPayload::StrokePhase, SceneGraphItemPayload::IconPhase, SceneGraphItemPayload::LabelPhase}) {
102 qCDebug(RenderLog) << "rendering took:" << frameTimer.elapsed() << "ms for" << sg.items().size() << "items on" << sg.layerOffsets().size() << "layers";
181 if (!otherItem || otherItem->allowIconOverlap) { // TODO remove the allowIconOverlap check, this is a workaround for wrong z order
225 // - non-shield texts are being laid out, so we need to only look at things after a it.base() or later
231 if ((p & SceneGraphItemPayload::IconPhase) == 0 && ((p & SceneGraphItemPayload::LabelPhase) == 0 || it2 < it.base())) {
236 if (!otherItem || otherItem->iconHidden || otherItem->allowTextOverlap) { // TODO limit the allowTextOverlap check to icons, this is a workaround for wrong z order
247 if (it2 >= it.base() && otherItem->hasText() && !otherItem->textHidden && otherItem->textHitBox(m_view).intersects(bbox)) {
261static inline void drawGeometry(QPainter *painter, const QPolygonF &polygon) { painter->drawPolygon(polygon, Qt::OddEvenFill); }
262static inline void drawGeometry(QPainter *painter, const QPainterPath &path) { painter->drawPath(path); }
317void PainterRenderer::renderMultiPolygon(MultiPolygonItem *item, SceneGraphItemPayload::RenderPhase phase)
336void PainterRenderer::renderPolyline(PolylineItem *item, SceneGraphItemPayload::RenderPhase phase)
345 p.setWidthF(mapToSceneWidth(item->pen.widthF(), item->penWidthUnit) + mapToSceneWidth(item->casingPen.widthF(), item->casingPenWidthUnit));
372 m_painter->drawRect(item->shieldHitBox(m_view).translated(-m_view->mapSceneToScreen(item->pos)));
392 QRectF iconRect(QPointF(-iconOutputSize.width() / 2.0, -iconOutputSize.height() / 2.0), iconOutputSize);
406 const auto haloBox = box.adjusted(-item->haloRadius, -item->haloRadius, item->haloRadius, item->haloRadius);
489 // m_painter->transform().inverted().translate(m_painter->transform().dx(), m_painter->transform().dy());
495 auto viewport = m_view->viewportForZoom(std::round(m_view->zoomLevel() * TextureZoomSteps) / TextureZoomSteps,
QRectF boundingRect(const View *view) const override
Bounding box of this item in scene coordinates.
Definition scenegraphitem.cpp:92
Multi-polygon item, used for polygons with "holes" in them.
Definition scenegraphitem.h:135
bool useCasingFillMode() const
Render like lines, ie casing and filling in the stroke phase, rather than the default.
Definition scenegraphitem.cpp:68
RenderPhase
See MapCSS spec: "Within a layer, first all fills are rendered, then all casings, then all strokes,...
Definition scenegraphitem.h:65
QRectF viewportForZoom(double zoom, QPointF screenCenter) const
Computes the viewport for the given zoom level and screenCenter.
Definition view.cpp:123
QTransform deviceTransform() const
Device tranformation for manual high DPI scaling.
Definition view.cpp:307
double mapMetersToScene(double meters) const
Returns how many units in scene coordinate represent the distance of meters in the current view trans...
Definition view.cpp:257
int screenWidth() const
Screen-space sizes, ie the size of the on-screen area used for displaying.
Definition view.cpp:63
double mapScreenDistanceToSceneDistance(double distance) const
Converts a distance in screen coordinates to a distance in scene coordinates.
Definition view.cpp:191
QPointF mapSceneToScreen(QPointF scenePos) const
Converts a point in scene coordinates to screen coordinates.
Definition view.cpp:175
QTransform sceneToScreenTransform() const
The transformation to apply to scene coordinate to get to the view on screen.
Definition view.cpp:208
OSM-based multi-floor indoor maps for buildings.
Definition locationqueryoverlayproxymodel.h:20
const QColor & color() const const
void setTransform(const QTransform &matrix)
Qt::BrushStyle style() const const
int alpha() const const
float alphaF() const const
qint64 elapsed() const const
void start()
void setColorAt(qreal position, const QColor &color)
bool isNull() const const
void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment, Mode mode, State state) const const
Format_ARGB32
void setFinalStop(const QPointF &stop)
void setStart(const QPointF &start)
CompositionMode_SourceIn
Antialiasing
void drawImage(const QPoint &point, const QImage &image)
void drawPath(const QPainterPath &path)
void drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fillRule)
void drawPolyline(const QPoint *points, int pointCount)
void drawRect(const QRect &rectangle)
void drawStaticText(const QPoint &topLeftPosition, const QStaticText &staticText)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
void restore()
void rotate(qreal angle)
void save()
void setBrush(Qt::BrushStyle style)
void setClipRect(const QRect &rectangle, Qt::ClipOperation operation)
void setFont(const QFont &font)
void setOpacity(qreal opacity)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
void setTransform(const QTransform &transform, bool combine)
void translate(const QPoint &offset)
void setWidthF(qreal width)
qreal widthF() const const
QRectF intersected(const QRectF &rectangle) const const
bool intersects(const QRectF &rectangle) const const
void moveCenter(const QPointF &position)
QRectF translated(const QPointF &offset) const const
qreal height() const const
bool isNull() const const
qreal width() const const
QSizeF size() const const
NoBrush
OddEvenFill
green
NoPen
QTransform & scale(qreal sx, qreal sy)
QTransform & translate(qreal dx, qreal dy)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.