Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f1384c2

Browse files
committedMay 21, 2019
Add missing dox to QgsRenderContext
1 parent e614942 commit f1384c2

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed
 

‎python/core/auto_generated/qgsrendercontext.sip.in

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ render and represents the exact bounds of the map being rendered.
203203
%End
204204

205205
const QgsMapToPixel &mapToPixel() const;
206+
%Docstring
207+
Returns the context's map to pixel transform, which transforms between map coordinates and device coordinates.
208+
209+
.. seealso:: :py:func:`setMapToPixel`
210+
%End
206211

207212
double scaleFactor() const;
208213
%Docstring
@@ -214,8 +219,20 @@ per millimeter.
214219
%End
215220

216221
bool renderingStopped() const;
222+
%Docstring
223+
Returns ``True`` if the rendering operation has been stopped and any ongoing
224+
rendering should be canceled immediately.
225+
226+
.. seealso:: :py:func:`setRenderingStopped`
227+
%End
217228

218229
bool forceVectorOutput() const;
230+
%Docstring
231+
Returns ``True`` if rendering operations should use vector operations instead
232+
of any faster raster shortcuts.
233+
234+
.. seealso:: :py:func:`setForceVectorOutput`
235+
%End
219236

220237
bool useAdvancedEffects() const;
221238
%Docstring
@@ -228,6 +245,11 @@ Used to enable or disable advanced effects such as blend modes
228245
%End
229246

230247
bool drawEditingInformation() const;
248+
%Docstring
249+
Returns ``True`` if edit markers should be drawn during the render operation.
250+
251+
.. seealso:: :py:func:`setDrawEditingInformation`
252+
%End
231253

232254
double rendererScale() const;
233255
%Docstring
@@ -239,6 +261,11 @@ for the rendered map, eg 1000.0 for a 1:1000 map render.
239261

240262

241263
QColor selectionColor() const;
264+
%Docstring
265+
Returns the color to use when rendering selected features.
266+
267+
.. seealso:: :py:func:`setSelectionColor`
268+
%End
242269

243270
bool showSelection() const;
244271
%Docstring
@@ -267,6 +294,11 @@ Set to an invalid QgsCoordinateTransform to indicate that no transformation is r
267294
%End
268295

269296
void setMapToPixel( const QgsMapToPixel &mtp );
297+
%Docstring
298+
Sets the context's map to pixel transform, which transforms between map coordinates and device coordinates.
299+
300+
.. seealso:: :py:func:`mapToPixel`
301+
%End
270302

271303
void setExtent( const QgsRectangle &extent );
272304
%Docstring
@@ -298,8 +330,19 @@ render and represents the exact bounds of the map being rendered.
298330
%End
299331

300332
void setDrawEditingInformation( bool b );
333+
%Docstring
334+
Sets whether edit markers should be drawn during the render operation.
335+
336+
.. seealso:: :py:func:`drawEditingInformation`
337+
%End
301338

302339
void setRenderingStopped( bool stopped );
340+
%Docstring
341+
Sets whether the rendering operation has been ``stopped`` and any ongoing
342+
rendering should be canceled immediately.
343+
344+
.. seealso:: :py:func:`renderingStopped`
345+
%End
303346

304347
void setDistanceArea( const QgsDistanceArea &distanceArea );
305348
%Docstring
@@ -336,8 +379,20 @@ of any rendering operations.
336379
%End
337380

338381
void setForceVectorOutput( bool force );
382+
%Docstring
383+
Sets whether rendering operations should use vector operations instead
384+
of any faster raster shortcuts.
385+
386+
.. seealso:: :py:func:`forceVectorOutput`
387+
%End
388+
339389

340390
void setSelectionColor( const QColor &color );
391+
%Docstring
392+
Sets the ``color`` to use when rendering selected features.
393+
394+
.. seealso:: :py:func:`selectionColor`
395+
%End
341396

342397
void setShowSelection( bool showSelection );
343398
%Docstring

‎src/core/qgsrendercontext.h

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ class CORE_EXPORT QgsRenderContext
250250
*/
251251
QgsRectangle mapExtent() const { return mOriginalMapExtent; }
252252

253+
/**
254+
* Returns the context's map to pixel transform, which transforms between map coordinates and device coordinates.
255+
*
256+
* \see setMapToPixel()
257+
*/
253258
const QgsMapToPixel &mapToPixel() const {return mMapToPixel;}
254259

255260
/**
@@ -260,8 +265,20 @@ class CORE_EXPORT QgsRenderContext
260265
*/
261266
double scaleFactor() const {return mScaleFactor;}
262267

268+
/**
269+
* Returns TRUE if the rendering operation has been stopped and any ongoing
270+
* rendering should be canceled immediately.
271+
*
272+
* \see setRenderingStopped()
273+
*/
263274
bool renderingStopped() const {return mRenderingStopped;}
264275

276+
/**
277+
* Returns TRUE if rendering operations should use vector operations instead
278+
* of any faster raster shortcuts.
279+
*
280+
* \see setForceVectorOutput()
281+
*/
265282
bool forceVectorOutput() const;
266283

267284
/**
@@ -274,6 +291,11 @@ class CORE_EXPORT QgsRenderContext
274291
*/
275292
void setUseAdvancedEffects( bool enabled );
276293

294+
/**
295+
* Returns TRUE if edit markers should be drawn during the render operation.
296+
*
297+
* \see setDrawEditingInformation()
298+
*/
277299
bool drawEditingInformation() const;
278300

279301
/**
@@ -289,6 +311,11 @@ class CORE_EXPORT QgsRenderContext
289311
*/
290312
QgsLabelingEngine *labelingEngine() const { return mLabelingEngine; } SIP_SKIP
291313

314+
/**
315+
* Returns the color to use when rendering selected features.
316+
*
317+
* \see setSelectionColor()
318+
*/
292319
QColor selectionColor() const { return mSelectionColor; }
293320

294321
/**
@@ -314,6 +341,11 @@ class CORE_EXPORT QgsRenderContext
314341
*/
315342
void setCoordinateTransform( const QgsCoordinateTransform &t );
316343

344+
/**
345+
* Sets the context's map to pixel transform, which transforms between map coordinates and device coordinates.
346+
*
347+
* \see mapToPixel()
348+
*/
317349
void setMapToPixel( const QgsMapToPixel &mtp ) {mMapToPixel = mtp;}
318350

319351
/**
@@ -342,8 +374,19 @@ class CORE_EXPORT QgsRenderContext
342374
*/
343375
void setMapExtent( const QgsRectangle &extent ) { mOriginalMapExtent = extent; }
344376

377+
/**
378+
* Sets whether edit markers should be drawn during the render operation.
379+
*
380+
* \see drawEditingInformation()
381+
*/
345382
void setDrawEditingInformation( bool b );
346383

384+
/**
385+
* Sets whether the rendering operation has been \a stopped and any ongoing
386+
* rendering should be canceled immediately.
387+
*
388+
* \see renderingStopped()
389+
*/
347390
void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;}
348391

349392
/**
@@ -376,13 +419,25 @@ class CORE_EXPORT QgsRenderContext
376419
*/
377420
void setPainter( QPainter *p ) {mPainter = p;}
378421

422+
/**
423+
* Sets whether rendering operations should use vector operations instead
424+
* of any faster raster shortcuts.
425+
*
426+
* \see forceVectorOutput()
427+
*/
379428
void setForceVectorOutput( bool force );
380429

381430
/**
382431
* Assign new labeling engine
383432
* \note not available in Python bindings
384433
*/
385434
void setLabelingEngine( QgsLabelingEngine *engine2 ) { mLabelingEngine = engine2; } SIP_SKIP
435+
436+
/**
437+
* Sets the \a color to use when rendering selected features.
438+
*
439+
* \see selectionColor()
440+
*/
386441
void setSelectionColor( const QColor &color ) { mSelectionColor = color; }
387442

388443
/**

0 commit comments

Comments
 (0)
Please sign in to comment.