1b1183 Improve mypaint chip icon

Authored and Committed by manongjohn 2 years ago
    Improve mypaint chip icon
    
        
toonz/sources/toonzlib/mypaintbrushstyle.cpp CHANGED
@@ -289,11 +289,15 @@ void TMyPaintBrushStyle::makeIcon(const TDimension &d) {
289
289
double sx = (double)d.lx / (double)m_preview->getLx();
290
290
double sy = (double)d.ly / (double)m_preview->getLy();
291
291
double scale = std::min(sx, sy);
292
- TRop::quickPut(m_icon, m_preview, TScale(scale));
292
+ TRaster32P resamplePreview(m_preview->getLx(), m_preview->getLy());
293
+ TRop::resample(resamplePreview, m_preview, TScale(scale),
294
+ TRop::ResampleFilterType::Hamming3);
295
+ TRop::over(m_icon, resamplePreview);
293
296
}
294
297
295
298
// paint color marker
296
- if (d.lx > 0 && d.ly > 0) {
299
+ // Only show color marker when the icon size is 22x22
300
+ if (d.lx == d.ly && d.lx <= 22) {
297
301
int size = std::min(1 + std::min(d.lx, d.ly) * 2 / 3,
298
302
1 + std::max(d.lx, d.ly) / 2);
299
303
TPixel32 color = getMainColor();