Changeset View
Changeset View
Standalone View
Standalone View
libs/image/kis_selection_filters.cpp
Show First 20 Lines • Show All 606 Lines • ▼ Show 20 Line(s) | 606 | if (last_max < max[x + i][circ[i]]) { | |||
---|---|---|---|---|---|
607 | last_max = max[x + i][circ[i]]; | 607 | last_max = max[x + i][circ[i]]; | ||
608 | last_index = i; | 608 | last_index = i; | ||
609 | } | 609 | } | ||
610 | out[x] = last_max; | 610 | out[x] = last_max; | ||
611 | } | 611 | } | ||
612 | } | 612 | } | ||
613 | pixelSelection->writeBytes(out, rect.x(), rect.y() + y, rect.width(), 1); | 613 | pixelSelection->writeBytes(out, rect.x(), rect.y() + y, rect.width(), 1); | ||
614 | } | 614 | } | ||
615 | /* undo the offsets to the pointers so we can free the malloced memmory */ | 615 | /* undo the offsets to the pointers so we can free the malloced memory */ | ||
616 | circ -= m_xRadius; | 616 | circ -= m_xRadius; | ||
617 | max -= m_xRadius; | 617 | max -= m_xRadius; | ||
618 | 618 | | |||
619 | delete[] circ; | 619 | delete[] circ; | ||
620 | delete[] buffer; | 620 | delete[] buffer; | ||
621 | delete[] max; | 621 | delete[] max; | ||
622 | for (qint32 i = 0; i < m_yRadius + 1; i++) | 622 | for (qint32 i = 0; i < m_yRadius + 1; i++) | ||
623 | delete[] buf[i]; | 623 | delete[] buf[i]; | ||
▲ Show 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 755 | if (last_max > max[x + i][circ[i]]) { | |||
757 | last_index = i; | 757 | last_index = i; | ||
758 | } | 758 | } | ||
759 | out[x] = last_max; | 759 | out[x] = last_max; | ||
760 | } | 760 | } | ||
761 | } | 761 | } | ||
762 | pixelSelection->writeBytes(out, rect.x(), rect.y() + y, rect.width(), 1); | 762 | pixelSelection->writeBytes(out, rect.x(), rect.y() + y, rect.width(), 1); | ||
763 | } | 763 | } | ||
764 | 764 | | |||
765 | // undo the offsets to the pointers so we can free the malloced memmory | 765 | // undo the offsets to the pointers so we can free the malloced memory | ||
766 | circ -= m_xRadius; | 766 | circ -= m_xRadius; | ||
767 | max -= m_xRadius; | 767 | max -= m_xRadius; | ||
768 | 768 | | |||
769 | delete[] circ; | 769 | delete[] circ; | ||
770 | delete[] buffer; | 770 | delete[] buffer; | ||
771 | delete[] max; | 771 | delete[] max; | ||
772 | for (qint32 i = 0; i < m_yRadius + 1; i++) | 772 | for (qint32 i = 0; i < m_yRadius + 1; i++) | ||
773 | delete[] buf[i]; | 773 | delete[] buf[i]; | ||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |