blur

How to do a motion blur effect on an UIImageView in Monotouch?

穿精又带淫゛_ 提交于 2019-12-04 06:41:35
问题 What's the way to do a realtime motion blur in MonoTouch? I need to apply a motion blur effect on an UIImageView when scrolling an inertial picture gallery, with strength and direction as parameters, as in Photoshop. I can't find any blur or motion blur filter in CocoaTouch or in CoreAnimation or anywhere in the iOS SDK. Is there some 2D effects library usable from MonoTouch with realtime blur filters that are good for the iPhone? Thanks in advance. 回答1: I've found a good open source library

iOS / GLES2: How to achieve Glow Effect

天大地大妈咪最大 提交于 2019-12-04 05:02:59
问题 I have a compass style needle, free to spin. I need it to glow when it approaches a certain orientation, say 55 degrees. I want to have NeedleView subclass UIView, so I can manipulate (NeedleView*)needleView as if it was a UIView, just have a couple of extra methods - (void) feedAngle: (float) theta; - (void) feedGlow: (float) glow_01; doing a bit of research, I have found that the common technique is to take a greyscale copy of the needle's image, blur it, save it as a GL texture, and then

HTML5 Canvas Motion Blur effect?

拜拜、爱过 提交于 2019-12-04 03:47:42
问题 I'm trying to use HTML5 canvas to make something like a motion blur effect and no success. Basically what I'm trying to do is to take a photo and make it look like "fast forwarded", like when you take a picture and the person moved. 回答1: There are several libraries for canvas that have implemented various blurring algorithms. EaselJS has implemented x- and y-axis blurring independently, as you can see in this sample. All you might want is a x-axis blur from their libray. 回答2: I got here with

The method getWindow() is undefined for the type AlertDialog.Builder

两盒软妹~` 提交于 2019-12-04 00:48:41
问题 Idea taken from Android: Blurring and dimming background windows from dialog. I'm having trouble getting the content under my dialog to blur. When calling eula.getWindow() I receive this error: The method getWindow() is undefined for the type AlertDialog.Builder The eula is displayed with this bit of code from the main activity: EulaHelper.showEula(false, this); Any help is greatly appreciated. public static void showEula(final boolean accepted, final FragmentActivity activity) { AlertDialog

How to set Blur background when dialog create

我是研究僧i 提交于 2019-12-03 20:54:40
How to set Blur background when dialog create? I found DialogFragment only and AlertDialog but I want to set in Dialog in activity How to create it or What's library recommend? final Dialog dialog = new Dialog(this); dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); Window window = dialog.getWindow(); window.setBackgroundDrawableResource(android.R.color.transparent); window.setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT); dialog.setContentView(R.layout.register_policy_dialog); try this dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG

iOS blur effect to ImageView with Swift

社会主义新天地 提交于 2019-12-03 20:15:45
I am trying to make simple iOS app. I need to make image view with blur effect. I found this code on Stack Overflow: class BlurImageView: UIImageView { override func awakeFromNib() { super.awakeFromNib() } required init(coder aDecoder: NSCoder!){ super.init(coder: aDecoder) var blur:UIBlurEffect = UIBlurEffect(style: UIBlurEffectStyle.Light) var effectView:UIVisualEffectView = UIVisualEffectView (effect: blur) effectView.frame = frame addSubview(effectView) } } And I need to connect this class to my image_view , but I don't know how to do it. I try to do it in my view_did_load function in my

How to blur everything except 2 nodes. Spritekit (Swift)

末鹿安然 提交于 2019-12-03 17:33:20
问题 I'd like to blur the background of my game when self.view?.scene?.paused = true But the the button and the paused label (both SKSpriteNode's) should not be blur. they all have different Z-index values. The scene is paused when the button node is pressed and resumed when the button is pressed again. I cant find a way to achieve this in Swift. i found some suggestions that use SKEffectNode? 回答1: The basic steps... Create an SKEffectsNode Create a CIGaussianBlur CIFilter Assign the filter to the

Click on jQuery Sortable list does not blur input

。_饼干妹妹 提交于 2019-12-03 17:04:39
I can blur my input by clicking anywhere on the page except the jQuery Sortable list. How can I fix this? UPD: demo $('sortable').mousedown(function(){ document.activeElement.blur(); }); Take a look at the cancel option from the jquery-ui $("#sortable").sortable(cancel: 'input'); You'll have to remove the $("#sortable").disableSelection(); See my jsfiddle UPDATE I understand your problem. Because jQuery stops the default functionality of the browser when sorting a list, the blur is never called for that field. You'll have to force the field to blur. See my jsfiddle . I use change to call the

Cross-browser: detect blur event on window

纵然是瞬间 提交于 2019-12-03 16:45:02
问题 I just read, I think all the thread that deals with this subject, and I can't find a real solution to my problem. I need to detect when the browser window loses its focus, i.e. a blur event. I've tried all the scripts on stackoverflow, but there doesn't seem to be a proper cross-browser approach. Firefox is the problematic browser here. A common approach using jQuery is: window.onblur = function() { console.log('blur'); } //Or the jQuery equivalent: jQuery(window).blur(function(){ console.log

jQuery Stop .blur() event when clicking “submit” button

喜夏-厌秋 提交于 2019-12-03 16:23:21
问题 I am building a small landing page with a simple demo e-mail signup form. I want to have the form field open up when focused, and then shrink back down on blur. However the problem I'm facing is when you click the submit button this instigates the blur function, hiding the button and shrinking the form. I need to find a way to stop the .blur() method only when the user is clicking to focus on the submit button. Is there any good workaround for this? Would appreciate any help I can get! 回答1: