|
wiRedPanda
Logic Circuit Simulator
|
Renders an IC's DIP-package body and builds its sizing/preview pixmaps. More...
#include <ICRenderer.h>
Static Public Member Functions | |
| static void | drawBody (IC &ic, QPainter *painter) |
| static void | generatePixmap (IC &ic) |
| static void | generatePreviewPixmap (IC &ic, const QList< QGraphicsItem * > &items) |
Renders an IC's DIP-package body and builds its sizing/preview pixmaps.
Extracted from IC so rendering is a collaborator rather than a cluster of methods on the element itself, mirroring the GraphicElement / GraphicElementSerializer split. A friend of IC, it reaches the element's appearance/pixmap state directly. All methods are static and take the IC explicitly; IC keeps all state, so this is a pure logic extraction, not a new owner-back-pointer collaborator.
Definition at line 26 of file ICRenderer.h.
|
static |
Draws the IC body (DIP rect, mascot logo, shadow, pin-1 notch) straight onto painter as vectors, so it stays crisp at any zoom instead of blitting a fixed-resolution pixmap.
Definition at line 47 of file ICRenderer.cpp.
References IC::boundingRect(), icLogoRenderer(), IC::isEmbedded(), GraphicElement::isFlippedX(), GraphicElement::isFlippedY(), GraphicElement::pixmap(), GraphicElement::rotation(), and IC::save().
Referenced by IC::paint().
|
static |
Rebuilds ic's sizing pixmap (its image content is never displayed; only its size, which pixmapCenter()/boundingRect() depend on, matters — the body is drawn as vectors).
Definition at line 26 of file ICRenderer.cpp.
References GraphicElement::m_appearance, GraphicElement::renderBodyBounds(), and ElementAppearance::setRenderPixmap().
|
static |
Snapshots items (the sub-circuit as designed, before boundary substitution) into ic's cached hover-preview pixmap.
Definition at line 98 of file ICRenderer.cpp.
References ICPreviewPopup::MaxElementCount, ICPreviewPopup::MaxHeight, and ICPreviewPopup::MaxWidth.