mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Document and revise filter logic
This commit is contained in:
parent
27cb05a0b4
commit
fc6ea196c2
1 changed files with 11 additions and 3 deletions
14
plotter.cpp
14
plotter.cpp
|
|
@ -527,8 +527,18 @@ CPlotter::drawFilter()
|
|||
dpr = devicePixelRatio()](int const width,
|
||||
int const lineX)
|
||||
{
|
||||
// Ending up with an unusable size here is expected, as in the case
|
||||
// where the combination of the filter center and width shifts one
|
||||
// or both ends of the filter out of the displayed range. Thus, no
|
||||
// matter what, we're going to return a pixmap here, though it may
|
||||
// be an empty one.
|
||||
|
||||
if (auto const size = QSize(width, height);
|
||||
!size.isEmpty())
|
||||
size.isEmpty())
|
||||
{
|
||||
return QPixmap();
|
||||
}
|
||||
else
|
||||
{
|
||||
QPixmap pixmap = QPixmap(size * dpr);
|
||||
pixmap.setDevicePixelRatio(dpr);
|
||||
|
|
@ -541,8 +551,6 @@ CPlotter::drawFilter()
|
|||
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
return QPixmap();
|
||||
};
|
||||
|
||||
auto const width = m_filterWidth / 2.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue