Blurry Panel?!
-
-
Yes I think there was an issue with the gaussian blur IPP routine on macOS which is why I deactivated it. Box Blur doesn't look as smooth, but it's way faster anyway.
-
@Christoph-Hart
Ok great! Thanks @Christoph-Hart -
I could use some help with Paint Routines involving Panel Blur and GUI scaling. I've created an image at 2X scale, so GUI zoom level at 200% looks good.
My original paint routine looked like this, and scaled properly:Panel1.loadImage("{PROJECT_FOLDER}Panel1.png", "Panel_1"); Panel1.setPaintRoutine(function(fp) { fp.drawImage("Panel_1", [0, 0, this.getWidth(), this.getHeight()], 0, 0); });
I wanted to blur this panel when another is opened, so I did this:
var BlurLevel = 0; Panel1.loadImage("{PROJECT_FOLDER}Panel1.png", "Panel_1"); Panel1.setPaintRoutine(function(fp) { fp.beginLayer(true); fp.drawImage("Panel_1", [0, 0, this.getWidth(), this.getHeight()], 0, 0); fp.boxBlur(BlurLevel); fp.endLayer(); });
And this is what I'm doing when this new panel opens/closes:
const var PanelOpen = Content.getComponent("Panel_Open"); inline function onPanelOpenControl(component, value) { BlurLevel = value *5; //Set Blur Level Panel1.repaint(); //blur panel in background }; Content.getComponent("PanelOpen").setControlCallback(onPanelOpenControl);
In this configuration, Blur works just fine, but the png doesn't redraw when GUI scaling is changed and the result is not crisp.
What would you guys do? -
And.... of course it starts working directly after I post for help.
False alarm -
@Natan The snippet works now. The fault was mine, sorry. My version of Hise was the master (the one made 2 years ago). Now I got why I didn't had all the features you guys have! Thanks
-
After implementing this paint routine, my panels are no longer redrawing when using GUI zoom. Am I missing something stupid?
Panel1.setPaintRoutine(function(fp) { fp.beginLayer(true); fp.drawImage("Panel_1", [0, 0, this.getWidth(), this.getHeight()], 0, 0); fp.boxBlur(BlurLevel); fp.endLayer(); });
-
@dustbro No idea about the not redrawing, but why do you use
fp
as the variable name? You miss out on the auto-complete. -
@dustbro I use boxBlur with no issue when zooming. At least in Hise, I haven't tested an exported project...
-
@ustk said in Blurry Panel?!:
I use boxBlur with no issue when zooming.
The GUI zoom works, but the image becomes blurry.
@d-healey said in Blurry Panel?!:
why do you use fp as the variable name?
I try to use variables that align with their property... but sometimes that auto-complete is really handy. Maybe I'll switch it up.