Skip to content
Permalink
Browse files

Add QgsRenderContext to QgsLayerTreeModelLegendNode::ItemContext

  • Loading branch information
roya0045 authored and nyalldawson committed Jan 15, 2019
1 parent 773ee55 commit 004d6bae5f0d0f1b143e852ebdf9a414ee8a20c4
@@ -76,6 +76,7 @@ Default implementation does nothing. *

struct ItemContext
{
QgsRenderContext *context;
QPainter *painter;
QPointF point;
double labelXOffset;
@@ -86,6 +86,8 @@ class CORE_EXPORT QgsLayerTreeModelLegendNode : public QObject

struct ItemContext
{
//! Render context, if available
QgsRenderContext *context = nullptr;
//! Painter
QPainter *painter = nullptr;
//! Top-left corner of the legend item
@@ -536,6 +536,7 @@ QgsLegendRenderer::Nucleon QgsLegendRenderer::drawSymbolItem( QgsLayerTreeModelL
QgsLegendRenderer::Nucleon QgsLegendRenderer::drawSymbolItemInternal( QgsLayerTreeModelLegendNode *symbolItem, QgsRenderContext *context, QPainter *painter, QPointF point, double labelXOffset )
{
QgsLayerTreeModelLegendNode::ItemContext ctx;
ctx.context = context;
ctx.painter = context ? context->painter() : painter;
ctx.point = point;
ctx.labelXOffset = labelXOffset;

0 comments on commit 004d6ba

Please sign in to comment.
You can’t perform that action at this time.