mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #4906 from JakubValtar/interpolation
Enable bicubic interpolation for image-based editor components
This commit is contained in:
@@ -112,6 +112,11 @@ implements MouseListener, MouseMotionListener, ActionListener {
|
||||
} else if (rollover) {
|
||||
image = rolloverImage;
|
||||
}
|
||||
|
||||
Graphics2D g2 = (Graphics2D) g;
|
||||
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
|
||||
|
||||
int dim = getSize().width; // width == height
|
||||
if (gradient != null) {
|
||||
//g.drawImage(gradient, 0, 0, DIM, DIM, this);
|
||||
|
||||
@@ -717,6 +717,8 @@ public class Toolkit {
|
||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
|
||||
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
|
||||
if (Toolkit.isRetina()) {
|
||||
// Looks great on retina, not so great (with our font) on 1x
|
||||
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
|
||||
Reference in New Issue
Block a user