Esempio n. 1
0
QgsRenderContext QgsLayoutUtils::createRenderContextForLayout( QgsLayout *layout, QPainter *painter, double dpi )
{
  QgsLayoutItemMap *referenceMap = layout ? layout->referenceMap() : nullptr;
  QgsRenderContext context = createRenderContextForMap( referenceMap, painter, dpi );
  if ( layout )
    context.setFlags( layout->context().renderContextFlags() );
  return context;
}
Esempio n. 2
0
QgsRenderContext QgsComposerUtils::createRenderContextForComposition( QgsComposition* composition, QPainter* painter )
{
  QgsComposerMap* referenceMap = composition ? composition->referenceMap() : nullptr;
  return createRenderContextForMap( referenceMap, painter );
}