void QgsFillSymbolLayer::drawPreviewIcon( QgsSymbolRenderContext &context, QSize size ) { QPolygonF poly = QRectF( QPointF( 0, 0 ), QPointF( size.width(), size.height() ) ); startRender( context ); QgsPaintEffect *effect = paintEffect(); if ( effect && effect->enabled() ) { QgsEffectPainter p( context.renderContext(), effect ); renderPolygon( poly, nullptr, context ); } else { renderPolygon( poly, nullptr, context ); } stopRender( context ); }
void QgsFillSymbolLayerV2::drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) { QPolygonF poly = QRectF( QPointF( 0, 0 ), QPointF( size.width(), size.height() ) ); startRender( context ); renderPolygon( poly, NULL, context ); stopRender( context ); }
void asciimage::Shape::render(QPainter* painter, int scale, const Style& style) const { painter->save(); if (style.isCutting()) { painter->setCompositionMode(QPainter::CompositionMode_Clear); } switch (type()) { case Type::EMPTY: // nothing to do break; case Type::POINT: renderPoint(painter, scale, style); break; case Type::LINE: renderLine(painter, scale, style); break; case Type::POLYGON: renderPolygon(painter, scale, style); break; case Type::ELLIPSE: renderEllipse(painter, scale, style); break; } painter->restore(); }