Search Results

Search found 316 results on 13 pages for 'blur'.

Page 10/13 | < Previous Page | 6 7 8 9 10 11 12 13  | Next Page >

  • How to run Fujitsu P27T-7 LED monitor in its not native resolution and have perfect fonts rendering

    - by Ilia Rostovtsev
    My problem is completely opposite to anything I could find as I need to run my monitor in its NOT native resolution and have perfect font rendering. I recently got myself Ultra HD 2560x1440 27 inch monitor (Fujitsu P27T-7 LED) and I have an issue with this. I would call it personal but I'm afraid it's not as few people already agreed with me. I do programming and the text on UHD is way to small for comfortable usage. I changed the resolution to regular Full HD (1920x1080), it became just right but the text is looking slightly blur now, in comparison to both its natural UHD resolution and/or to my old 23 inch NEC. I am pretty frustrated and not sure what to do and how to make fonts look just as sleek as they should? I can't work in UHD resolution (my vision is 100% perfect), simply if calculated, picture size with Ultra HD (2560x1440) on 27 inch is around 30% smaller than Full HD (1920x1080) on 23 inch. In order to have same font size, if compared with Full HD 23 inch, 27 inch Ultra HD monitor must be around 32 inches in size. If I set my new monitor to regular Full HD 1920x1080, then the fonts' size are just perfect but the quality is not as it's blurry? Could anyone please help me out with an advise of how to solve this problem? Spec: nVidia 560 Ti with DVI-D port on Fedora 20. EDIT 1: Changing fonts doesn't really help as everything else doesn't look the way it should. EDIT 2: The monitor is buzzing on 2560x1440 so badly in case there are lots of lines on the screen, like file listing. If I type ls /usr/bin it makes such nasty irritating sound. When resolution goes to 1920x1080 it's a bit better. Any idea why?

    Read the article

  • Despeckle line art

    - by Dour High Arch
    We have a number of line-art charts unfortunately saved as JPEGs. They are now riddled with distracting compression artifacts or "speckles". Is there any way of removing these? I do not have the original files and it will be very difficult to recreate them. I am running Windows 7 and tried Paint.Net; none of the filters help. Posterize washed out all the colors and leaves the speckles. Blur makes text unreadable. Noise Reduction wrecks antialiasing of curved lines, and perversely enhances the speckles, making them look like checkerboards. Yes, I have Googled for software to do this; there are many programs that advertise despeckling but, after my experience with Paint.Net, do not want to experiment with applications that show no before and after images. The only example I have seen that does what I want is from a Photoshop tutorial. I have dozens of files and the tutorial requires considerable manual fine-tuning. I would prefer to automate or batch-process this task. Commercial apps are fine, but I do not want to spend over $600 and learning a complex program for a single task.

    Read the article

  • Avoid Jquery Plugin Conflict

    - by user1511579
    on the same page i'm using this plugin: $g=jQuery.noConflict(); $g(function() { /* number of fieldsets */ var fieldsetCount = $g('#formElem').children().length; /* current position of fieldset / navigation link */ var current = 1; /* sum and save the widths of each one of the fieldsets set the final sum as the total width of the steps element */ var stepsWidth = 0; var widths = new Array(); $g('#steps .step').each(function(i){ var $step = $g(this); widths[i]   = stepsWidth; stepsWidth += $step.width(); }); $g('#steps').width(stepsWidth); /* to avoid problems in IE, focus the first input of the form */ $g('#formElem').children(':first').find(':input:first').focus(); /* show the navigation bar */ $g('#navigation_form').show(); /* when clicking on a navigation link  the form slides to the corresponding fieldset */ $g('#navigation_form a').bind('click',function(e){ var $this = $g(this); var prev = current; $this.closest('ul').find('li').removeClass('selected'); $this.parent().addClass('selected'); /* we store the position of the link in the current variable */ current = $this.parent().index() + 1; /* animate / slide to the next or to the corresponding fieldset. The order of the links in the navigation is the order of the fieldsets. Also, after sliding, we trigger the focus on the first  input element of the new fieldset If we clicked on the last link (confirmation), then we validate all the fieldsets, otherwise we validate the previous one before the form slided */ $g('#steps').stop().animate({ marginLeft: '-' + widths[current-1] + 'px' },500,function(){ if(current == fieldsetCount) validateSteps(); else validateStep(prev); $g('#formElem').children(':nth-child('+ parseInt(current) +')').find(':input:first').focus(); }); e.preventDefault(); }); /* clicking on the tab (on the last input of each fieldset), makes the form slide to the next step */ $g('#formElem > fieldset').each(function(){ var $fieldset = $g(this); $fieldset.children(':last').find(':input').keydown(function(e){ if (e.which == 9){ $g('#navigation_form li:nth-child(' + (parseInt(current)+1) + ') a').click(); /* force the blur for validation */ $g(this).blur(); e.preventDefault(); } }); }); /* validates errors on all the fieldsets records if the Form has errors in $('#formElem').data() */ function validateSteps(){ var FormErrors = false; for(var i = 1; i < fieldsetCount; ++i){ var error = validateStep(i); if(error == -1) FormErrors = true; } $g('#formElem').data('errors',FormErrors); } /* validates one fieldset and returns -1 if errors found, or 1 if not */ function validateStep(step){ if(step == fieldsetCount) return; var error = 1; var hasError = false; $g('#formElem').children(':nth-child('+ parseInt(step) +')').find(':input:not(button)').each(function(){ var $this = $g(this); var valueLength = jQuery.trim($this.val()).length; if(valueLength == ''){ hasError = true; $this.css('background-color','#FFEDEF'); } else $this.css('background-color','#FFFFFF'); }); var $link = $g('#navigation_form li:nth-child(' + parseInt(step) + ') a'); $link.parent().find('.error,.checked').remove(); var valclass = 'checked'; if(hasError){ error = -1; valclass = 'error'; } $g('<span class="'+valclass+'"></span>').insertAfter($link); return error; } /* if there are errors don't allow the user to submit */ $g('#registerButton').bind('click',function(){ if($g('#formElem').data('errors')){ alert('Please correct the errors in the Form'); return false; } }); }); and this one: (function($){ $countCursos = 1; $countFormsA = 1; $countFormsB = 1; $.fn.addForms = function(idform){ var adicionar_curso = "<p>"+ " <label for='nome_curso'>Nome do Curso</label>"+ " <input id='nome_curso' name='nome_curso["+$countCursos+"]' type='text' />"+ " </p>"; var myform2 = "<table>"+ " <tr>"+ " <td>Field C</td>"+ " <td><input type='text' name='fieldc["+$countFormsA+"]'></td>"+ " <td>Field D ("+$countFormsA+"):</td>"+ " <td><textarea name='fieldd["+$countFormsA+"]'></textarea></td>"+ " <td><button>remove</button></td>"+ " </tr>"+ "</table>"; var myform3 = "<table>"+ " <tr>"+ " <td>Field C</td>"+ " <td><input type='text' name='fieldc["+$countFormsB+"]'></td>"+ " <td>Field D ("+$countFormsB+"):</td>"+ " <td><textarea name='fieldd["+$countFormsB+"]'></textarea></td>"+ " <td><button>remove</button></td>"+ " </tr>"+ "</table>"; if(idform=='novo_curso'){ alert(idform); adicionar_curso = $("<div>"+adicionar_curso+"</div>"); $("button", $(adicionar_curso)).click(function(){ $(this).parent().parent().remove(); }); $(this).append(adicionar_curso); $countCursos++; } if(idform=='mybutton1'){ alert(idform); myform2 = $("<div>"+myform2+"</div>"); $("button", $(myform2)).click(function(){ $(this).parent().parent().remove(); }); $(this).append(myform2); $countFormsA++; } if(idform=='mybutton2'){ alert(idform); myform3 = $("<div>"+myform3+"</div>"); $("button", $(myform3)).click(function(){ $(this).parent().parent().remove(); }); $(this).append(myform3); $countFormsB++; } }; })(jQuery); $(function(){ $("#mybutton1").bind("click", function(e){ e.preventDefault(); var idform=this.id; if($countFormsA<3){ $("#container1").addForms(idform); } }); }); $(function(){ $("#novo_curso").bind("click", function(e){ e.preventDefault(); var idform=this.id; alert(idform); if($countCursos<3){ $("#outro_curso").addForms(idform); } }); }); $(function(){ $("#mybutton2").bind("click", function(e){ e.preventDefault(); var idform=this.id; if($countFormsB<3){ $("#container2").addForms(idform); } }); }); My problem is the two are making conflict: I added previously the $g on the first to avoid conflict, but the truth is they don't work together, any hint how can i configure the second one to avoid this? Thanks in advance!

    Read the article

  • upgraded "Compiz' and "Unity", now no Unity 3D on screen

    - by user18432
    Today when I logged in to my Ubuntu 12.04, the update manager told me of some upgrades. Compiz and Unity were in those upgrades. After I installed the upgrades, I can no longer get the Unity panel on the left side of screen or the systray at the top of screen. I now have to run Ubuntu 12.04 with Unity 2D. My laptop is a HP Pavilion dv9000 with Nvidia GeForce Go 7600 video. I tried to run "unity --reset" but it says there are serious issues with compiz. I have cut & pasted the read out from the terminal below. [09:35:02] xxxxxxx@L01U1204:~$ unity --reset unity-panel-service: no process found Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...no Backend : gconf Integration : true Profile : unity Adding plugins Initializing core options...done compiz (core) - Warn: failed to receive ConfigureNotify event on 0x2e00004 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x580005a compiz (core) - Warn: failed to receive ConfigureNotify event on 0x3600006 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x3200255 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1600002 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1400002 Initializing composite options...done Initializing opengl options...done Initializing decor options...done Initializing vpswitch options...done Initializing snap options...done Initializing mousepoll options...done Initializing resize options...done Initializing place options...done Initializing move options...done Initializing wall options...done Initializing grid options...done I/O warning : failed to load external entity "/home/brwright/.compiz/session/10afaca1703486b216133648409481824100000130110002" Initializing session options...done Initializing gnomecompat options...done Initializing animation options...done Initializing fade options...done Initializing unitymtgrabhandles options...done Initializing workarounds options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing ezoom options...done compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libunityshell.so' : /usr/lib/compiz/libunityshell.so: undefined symbol: _ZNK5unity4dash10Controller6windowEv compiz (core) - Error: Couldn't load plugin 'unityshell' compiz (core) - Warn: unhandled ConfigureNotify on 0x7000090! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0x7000093! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0x7000096! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0x7000099! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0x700009c! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0x700009f! compiz (core) - Warn: this should never happen. you should probably file a bug about this. Initializing annotate options...done Initializing blur options...done Initializing clone options...done Initializing colorfilter options...done Initializing commands options...done Initializing cube options...done Initializing imgjpeg options...done Initializing kdecompat options...done Initializing mag options...done Initializing neg options...done Initializing obs options...done Initializing opacify options...done Initializing put options...done Initializing resizeinfo options...done Initializing ring options...done Initializing rotate options...done Initializing scaleaddon options...done Initializing screenshot options...done Initializing shift options...done Initializing staticswitcher options...done Initializing switcher options...done Initializing thumbnail options...done Initializing unityshell options...done Initializing water options...done Initializing winrules options...done Initializing wobbly options...done Setting Update "main_menu_key" Setting Update "run_key" Starting gtk-window-decorator As you can see the terminal never comes back to the CI prompt. I must do a control C to get to the CI prompt, but then the OS is frozen. I have to reboot and run Unity 2D in able to do anything on my laptop. I hope I have explained this enough and provided some useful info. I am at a loss to understand what the problem is, or what exactly what is causing the problem. Is it Unity or Compiz? Can anyone help?

    Read the article

  • Improving performance of a particle system (OpenGL ES)

    - by Jason
    I'm in the process of implementing a simple particle system for a 2D mobile game (using OpenGL ES 2.0). It's working, but it's pretty slow. I start getting frame rate battering after about 400 particles, which I think is pretty low. Here's a summary of my approach: I start with point sprites (GL_POINTS) rendered in a batch just using a native float buffer (I'm in Java-land on Android, so that translates as a java.nio.FloatBuffer). On GL context init, the following are set: GLES20.glViewport(0, 0, width, height); GLES20.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); GLES20.glEnable(GLES20.GL_CULL_FACE); GLES20.glDisable(GLES20.GL_DEPTH_TEST); Each draw frame sets the following: GLES20.glEnable(GLES20.GL_BLEND); GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA); And I bind a single texture: GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureHandle); GLES20.glUniform1i(mUniformTextureHandle, 0); Which is just a simple circle with some blur (and hence some transparency) http://cl.ly/image/0K2V2p2L1H2x Then there are a bunch of glVertexAttribPointer calls: mBuffer.position(position); mGlEs20.glVertexAttribPointer(mAttributeRGBHandle, valsPerRGB, GLES20.GL_FLOAT, false, stride, mBuffer); ...4 more of these Then I'm drawing: GLES20.glUniformMatrix4fv(mUniformProjectionMatrixHandle, 1, false, Camera.mProjectionMatrix, 0); GLES20.glDrawArrays(GLES20.GL_POINTS, 0, drawCalls); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); My vertex shader does have some computation in it, but given that they're point sprites (with only 2 coordinate values) I'm not sure this is the problem: #ifdef GL_ES // Set the default precision to low. precision lowp float; #endif uniform mat4 u_ProjectionMatrix; attribute vec4 a_Position; attribute float a_PointSize; attribute vec3 a_RGB; attribute float a_Alpha; attribute float a_Burn; varying vec4 v_Color; void main() { vec3 v_FGC = a_RGB * a_Alpha; v_Color = vec4(v_FGC.x, v_FGC.y, v_FGC.z, a_Alpha * (1.0 - a_Burn)); gl_PointSize = a_PointSize; gl_Position = u_ProjectionMatrix * a_Position; } My fragment shader couldn't really be simpler: #ifdef GL_ES // Set the default precision to low. precision lowp float; #endif uniform sampler2D u_Texture; varying vec4 v_Color; void main() { gl_FragColor = texture2D(u_Texture, gl_PointCoord) * v_Color; } That's about it. I had read that transparent pixels in point sprites can cause issues, but surely not at only 400 points? I'm running on a fairly new device (12 month old Galaxy Nexus). My question is less about my approach (although I'm open to suggestion) but more about whether there are any specific OpenGL "no no's" that have leaked into my code. I'm sure there's GL master out there facepalming right now... I'd love to hear any critique.

    Read the article

  • User interfirance, themes, Broken, Unreadable parts

    - by Adames
    Arther going on a customizing spree my the desktop themes on unity got messed up I had installed Ubuntu tweak and unsettings so I removed them but the default themes and custom ones are still messed up I ran unity --reset and this is what I get: WARNING: Unity currently default profile, so switching to metacity while resetting the values unity-panel-service: no process found Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...no Backend : gconf Integration : true Profile : unity Adding plugins Initializing core options...done compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1200004 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x38000af compiz (core) - Warn: failed to receive ConfigureNotify event on 0x32000ad Initializing composite options...done Initializing opengl options...done Initializing decor options...done Initializing vpswitch options...done Initializing snap options...done Initializing mousepoll options...done Initializing resize options...done Initializing place options...done Initializing move options...done Initializing wall options...done Initializing grid options...done Initializing session options...done Initializing gnomecompat options...done Initializing animation options...done Initializing fade options...done Initializing unitymtgrabhandles options...done Initializing workarounds options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing ezoom options...done (compiz:4749): GConf-CRITICAL **: gconf_client_add_dir: assertion `gconf_valid_key (dirname, NULL)' failed Initializing unityshell options...done compiz (core) - Warn: unhandled ConfigureNotify on 0xc0009e! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a1! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a1! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a4! compiz (core) - Warn: this should never happen. you should probably file a bug about this. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/google-chrome.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/firefox.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-writer.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-calc.desktop' is using a deprecated format for its actions that will be dropped soon. WARN 2012-07-02 19:51:42 unity.libindicator <unknown>:0 Desktop file '/usr/share/applications/libreoffice-impress.desktop' is using a deprecated format for its actions that will be dropped soon. Initializing addhelper options...done Initializing animationaddon options...done Initializing annotate options...done Initializing bench options...done Initializing blur options...done Initializing clone options...done Initializing colorfilter options...done Initializing commands options...done Initializing crashhandler options...done Initializing cube options...done Initializing cubeaddon options...done Initializing extrawm options...done Initializing fadedesktop options...done Initializing firepaint options...done Initializing group options...done Initializing imgjpeg options...done Initializing kdecompat options...done Initializing loginout options...done Initializing mag options...done Initializing maximumize options...done Initializing mblur options...done Initializing neg options...done Initializing notification options...done Initializing obs options...done Initializing opacify options...done Initializing put options...done Initializing reflex options...done Initializing resizeinfo options...done Initializing ring options...done Initializing rotate options...done Initializing scaleaddon options...done Initializing scalefilter options...done Initializing screenshot options...done Initializing shelf options...done Initializing shift options...done Initializing showdesktop options...done Initializing showmouse options...done Initializing splash options...done Initializing staticswitcher options...done Initializing switcher options...done Initializing td options...done Initializing thumbnail options...done Initializing trailfocus options...done Initializing wallpaper options...done Initializing water options...done Initializing widget options...done Initializing winrules options...done Initializing wobbly options...done ERROR 2012-07-02 19:51:43 unity.glib-gobject <unknown>:0 g_object_unref: assertion `G_IS_OBJECT (object)' failed Setting Update "main_menu_key" Setting Update "run_key" Setting Update "autoraise" Setting Update "autoraise_delay" Any Ideas? this is very inconvenient some of the text like in additional drivers are unreadable because they come out White

    Read the article

  • no launcher, no dash, no unity, how to get back to my desktop?

    - by Numan Syed
    FYI, I have tried these, but none worked as of yet! Please help! I must not want to reinstall Ubuntu precise: AskUbuntu:Unity Launcher missing AskUbuntu: Unity doesn't load Youtube:Restore missing launcher AskUbuntu:Unity 3D no longer works! Is there any other way to find a solution, any help is highly appreciated! Please do ask for any further info u may need to point me to a better direction. Edit: I have still the opportunity to use ctrl+Alt+T for the terminal. And from there I used firefox & to get the browser on. Edit 2: Tried to find more; found more explained situation http://askubuntu.com/q/260578/176470. Edit 3:@Adithya: tried that no luck! Here is what my terminal gave me so far... [1447:22] (~) bash $ unity --reset WARNING: Unity currently default profile, so switching to metacity while resetting the values unity-panel-service: no process found Checking if settings need to be migrated ...no Checking if internal files need to be migrated ...no Backend : gconf Integration : true Profile : unity Adding plugins Initializing core options...done compiz (core) - Warn: failed to receive ConfigureNotify event on 0x1600004 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x30000b8 compiz (core) - Warn: failed to receive ConfigureNotify event on 0x2c00fc1 Initializing composite options...done Initializing opengl options...done Initializing decor options...done Initializing vpswitch options...done Initializing snap options...done Initializing mousepoll options...done Initializing resize options...done Initializing place options...done Initializing move options...done Initializing wall options...done Initializing grid options...done Initializing session options...done Initializing gnomecompat options...done Initializing animation options...done Initializing fade options...done compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libunitymtgrabhandles.so' : /usr/lib/compiz/libunitymtgrabhandles.so: undefined symbol: _ZN10CompOption7setNameEPKcNS_4TypeE compiz (core) - Error: Couldn't load plugin 'unitymtgrabhandles' Initializing workarounds options...done Initializing scale options...done compiz (expo) - Warn: failed to bind image to texture Initializing expo options...done Initializing ezoom options...done compiz (core) - Error: Couldn't load plugin '/usr/lib/compiz/libunityshell.so' : /usr/lib/compiz/libunityshell.so: undefined symbol: _ZN10CompOption7setNameEPKcNS_4TypeE compiz (core) - Error: Couldn't load plugin 'unityshell' compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a0! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a3! compiz (core) - Warn: this should never happen. you should probably file a bug about this. compiz (core) - Warn: unhandled ConfigureNotify on 0xc000a6! compiz (core) - Warn: this should never happen. you should probably file a bug about this. Initializing addhelper options...done Initializing animationaddon options...done Initializing annotate options...done Initializing bench options...done Initializing blur options...done Initializing clone options...done Initializing colorfilter options...done Initializing commands options...done Initializing crashhandler options...done Initializing cube options...done Initializing cubeaddon options...done Initializing extrawm options...done Initializing fadedesktop options...done Initializing firepaint options...done Initializing group options...done Initializing imgjpeg options...done Initializing kdecompat options...done Initializing loginout options...done Initializing mag options...done Initializing maximumize options...done Initializing mblur options...done Initializing neg options...done Initializing notification options...done Initializing obs options...done Initializing opacify options...done Initializing put options...done Initializing reflex options...done Initializing resizeinfo options...done Initializing ring options...done Initializing rotate options...done Initializing scaleaddon options...done Initializing scalefilter options...done Initializing screenshot options...done Initializing shelf options...done Initializing shift options...done Initializing showdesktop options...done Initializing showmouse options...done Initializing splash options...done Initializing staticswitcher options...done Initializing switcher options...done Initializing td options...done Initializing thumbnail options...done Initializing trailfocus options...done Initializing unitymtgrabhandles options...done Initializing unityshell options...done Initializing wallpaper options...done Initializing water options...done Initializing widget options...done Initializing winrules options...done Initializing wobbly options...done Setting Update "main_menu_key" Setting Update "run_key" Anything suspicious herein?

    Read the article

  • Day 5 - Tada! My Game Menu Screen Graphics

    - by dapostolov
    So, tonight I took some time to mash up some graphics for my game menu screen. My artistic talent sucks...but here goes nothing...voila, my menu screen!! The Menu Screen The screen above is displaying 4 sprites, even though it looks like maybe 7... I guess one of the first things for me to test in the future is ... is it more memory efficient (and better frame rate) to draw one big background image OR tp paint the screen black, and place each sprite in set locations? To display the 4 sprites above, I borrowed my code from yesterday ... I know, tacky, but...I wanted to see it, feel it. Do you feel it? FEEL IT! (homer voice & shakes fist) Note: the menu items won't scale properly as it stands with this code, well pretty much they do nothing except look pretty... Paint.Net & Google Fun So how did I create that image above? Well, to create the background and 3 menu items I used Paint.Net. Basically, I scoured Google images for: a stone doorway, a stone pillar, an old book, a wizards hat, and...that's it pretty much it! I'll let you type in those searches and see if you can locate the images I used. I know, bad developer...but I figured since I modified the images considerably it doesn't count...well for a personal project it shouldn't count...*shrug* Anyhow, I extracted each key assest I wanted from each image and applied lots of matting, blurring, color changes, glow effects and such. Then, using my vivid imagination I placed / composed each of the layered assets into the mashed up the "scene" above. Pretty cool, eh? Hey, did you know, the cool mist effect is actually a fire rendition in Paint.net? I set it to black & white with opacity set next to nothing. I'm also very proud of the yellow "light" in the stone doorway. I drew that in and then applied gausian blur to it to give it the effect of light creeping out around the door and into the room...heheh. So did I achieve the dark, mysterious ritual as I stated in my design doc? I think I had a great stab at it! Maybe down the road I can get a real artist to crank out some quality graphics for the game... =) So, What's Next? Well, I don't have that animated brazier yet...however, I thought it would be even cooler if I can get that door pulsing that yellow light and it would be extremely cool to have the smoke / mist moving across the screen! Make the creative ideas stop!! (clutches head) haha! I'm having great fun working on this project =) I recommend others giving something like this a try, it's really fulfilling. OK. Tomorrow... I think I'm going to start creating some game / menu objects as per the design doc, maybe even get a custom mouse cursor up on the screen and handle a couple of mouse events, and lastly, maybe a feature to toggle a framerate display... D.

    Read the article

  • XNA RenderTarget2D Sample

    - by Michael B. McLaughlin
    I remember being scared of render targets when I first started with XNA. They seemed like weird magic and I didn’t understand them at all. There’s nothing to be frightened of, though, and they are pretty easy to learn how to use. The first thing you need to know is that when you’re drawing in XNA, you aren’t actually drawing to the screen. Instead you’re drawing to this thing called the “back buffer”. Internally, XNA maintains two sections of graphics memory. Each one is exactly the same size as the other and has all the same properties (such as surface format, whether there’s a depth buffer and/or a stencil buffer, and so on). XNA flips between these two sections of memory every update-draw cycle. So while you are drawing to one, it’s busy drawing the other one on the screen. Then the current update-draw cycle ends, it flips, and the section you were just drawing to gets drawn to the screen while the one that was being drawn to the screen before is now the one you’ll be drawing on. This is what’s meant by “double buffering”. If you drew directly to the screen, the player would see all of those draws taking place as they happened and that would look odd and not very good at all. Those two sections of graphics memory are render targets. All a render target is, is a section of graphics memory to which things can be drawn. In addition to the two that XNA maintains automatically, you can also create and set your own using RenderTarget2D and GraphicsDevice.SetRenderTarget. Using render targets lets you do all sorts of neat post-processing effects (like bloom) to make your game look cooler. It also just lets you do things like motion blur and lets you create mirrors in 3D games. There are quite a lot of things that render targets let you do. To go along with this post, I wrote up a simple sample for how to create and use a RenderTarget2D. It’s available under the terms of the Microsoft Public License and is available for download on my website here: http://www.bobtacoindustries.com/developers/utils/RenderTarget2DSample.zip . Other than the ‘using’ statements, every line is commented in detail so that it should (hopefully) be easy to follow along with and understand. If you have any questions, leave a comment here or drop me a line on Twitter. One last note. While creating the sample I came across an interesting quirk. If you start by creating a Windows Game, and then make a copy for Windows Phone 7, the drop-down that lets you choose between drawing to a WP7 device and the WP7 emulator stays grayed-out. To resolve this, you need to right click on the Windows Phone 7 version in the Solution Explorer, and choose “Set as StartUp Project”. The bar will then become active, letting you change the target you which to deploy to. If you want another version to be the one that starts up when you press F5 to start debugging, just go and right-click on that version and choose “Set as StartUp Project” for it once you’ve set the WP7 target (device or emulator) that you want.

    Read the article

  • jQuery: How to check if a value exists in an array?

    - by Jannis
    Hello, I am trying to write a simple input field validation plugin at the moment (more of a learning exercise really) and thought this would not be too hard, seeing as all I should have to do is: Get input fields Store them in array with each one's value On submit of form check if array contains any empty strings But I seem to fail at writing something that checks for an empty string (read: input with no text inside) inside my array. Here is the code I have so far: var form = $(this), // passed in form element inputs = form.find('input'), // all of this forms input fields isValid = false; // initially set the form to not be valid function validate() { var fields = inputs.serializeArray(); // make an array out of input fields // start -- this does not work for (var n in fields) { if (fields[n].value == "") { isValid = false; console.log('failed'); } else { isValid = true; console.log('passed'); }; } // end -- this does not work }; // close validate() // TRIGGERS inputs.live('keyup blur', function(event) { validate(); }); Any help with how I can check if one of the fields is blank and if so return a isValid = false would be much appreciated. I also played around with the $.inArray("", fields) but this would never return 0 or 1 even when the console.log showed that the fields had no value. Thanks for reading.

    Read the article

  • jquery parseFloat assigning val to field

    - by user306472
    I have a select box that gives a description of a product along with a price. Depending on what the user selects, I'd like to automatically grab that dollar amount from the option selected and assign it to a price input field. My HTML: <tr> <td> <select class="selector"> <option value="Item One $500">Item One $500</option> <option value="Item Two $400">Item Two $400</option> </select> </td> <td> <input type="text" class="price"></input> </td> </tr> So based on what is selected, I want either 500 or 400 assigned to the .class input. I tried this but I'm not quite sure where I'm going wrong: $('.selector').blur(function(){ var selectVal = ('.selector > option.val()'); var parsedPrice = parseFloat(selectVal.val()); $('.price').val(parsedPrice); });

    Read the article

  • converted javascript to fbjs - tabs still not working

    - by JohnMerlino
    Hey all, I tried my best to convert javascript to fbjs according to this page: http://wiki.developers.facebook.com/index.php/FBJS. Yet my tabs are still not working properly. Does anyone have any suggestions how to fix this so I can click through the tabs and display and hide content accordingly: <script type="text/javascript"><!-- var tabLinks = []; var contentDivs = []; function init() { var tabListItems = document.getElementById('tabs').getChildNodes(); for ( var i = 0; i < tabListItems.length; i++ ) { if ( tabListItems[i].getNodeName("LI") ) { var tabLink = getFirstChildWithTagName( tabListItems[i], 'A' ); var id = getHash( tabLink.getAttribute('href') ); tabLinks[id] = tabLink; contentDivs[id] = document.getElementById( id ); } } var i = 0; for ( var id in tabLinks ) { tabLinks[id].addEventListener(onclick, showTab) tabLinks[id].addEventListener(onfocus, function() { this.blur() }; if ( i == 0 ) tabLinks[id].setClassName('selected'); i++;) } var i = 0; for ( var id in contentDivs ) { if ( i != 0 ) contentDivs[id].setClassName('tabContent hide'); i++; } } function showTab() { var selectedId = getHash( this.getAttribute('href') ); for ( var id in contentDivs ) { if ( id == selectedId ) { tabLinks[id].setClassName('selected'); contentDivs[id].setClassName('tabContent'); } else { tabLinks[id].setClassName(''); contentDivs[id].setClassName('tabContent hide'); } } return false; } function getFirstChildWithTagName( element, tagName ) { for ( var i = 0; i < element.getChildNodes().length; i++ ) { if ( element.getChildNodes[i].getNodeName(tagName) ) return element.getChildNodes[i]; } } function getHash( url ) { var hashPos = url.getLastIndexOf ( '#' ); return url.getSubString( hashPos + 1 ); } init(); --></script> Thanks for any response.

    Read the article

  • Jeditable Datepicker onblur problem

    - by Shobha Deepthi
    Hi, I am using inline editing using Jeditable and datepicker. I have a column in my table which displays Date as a hyperlink. When I click on this it shows me the datepicker. And when a particular date is selected its updated in the backend and the cell now is updated with the changed value. However, am having problem with onblur event while changing month or years. This event gets triggered when I click on "Prev" or "Next" buttons on the datepicker control. This causes an exception when the date is selected. This works fine as long as the date selected is in the current month. I tried all possible solutions listed here: stackoverflow.com/questions/2007205/jeditable-datepicker-causing-blur-when-changing-month If settimeout the control does not change back to a normal hyperlink on closing the datepicker or on a true onblur event. Here's my code, $.editable.addInputType('datepicker', { element : function(settings, original) { var input = $(''); if (settings.width != 'none') { input.width(settings.width); } if (settings.height != 'none') { input.height(settings.height); } input.attr('autocomplete','off'); $(this).append(input); return(input); }, plugin : function(settings, original) { var form = this; settings.onblur = function(e) { t = setTimeout(function() { original.reset.apply(form, [settings, self]); }, 100); }; $(this).find('input').datepicker({ changeMonth: true, changeYear: true, dateFormat: 'dd-M-y', closeAtTop: true, onSelect: function(dateText) { $(this).hide(); $(form).trigger('submit'); } }); }, submit : function(settings, original) { } }); $(function() { $('.edit_eta').editable('update_must_fix_eta.php', { id: 'bugid', name: 'eta', type: 'datepicker', event: 'click', select : true, width: '50px', onblur:'cancel', cssclass : 'editable', indicator : 'Updating ETA, please wait.', style : 'inherit', submitdata:{version:'4.2(4)',tag:'REL_4_2_4',qstr:1} }); }); I tried hacking jeditable.js as mentioned on this link: http://groups.google.com/group/jquery-dev/browse_thread/thread/265340ea692a2f47 Even this does not help. Any help is appreciated.

    Read the article

  • Detect Autocomplete

    - by Bryan Marble
    Hello, I have some forms that have inlined labels. I have some javascript (jQuery) that detects when focus has changed or when a user is entering text that changes the class so that the inlined label disappears and isn't blocking the user's view of their entered text. The problem I'm having occurs when the browser autocompletes the form. None of the conditions below are triggered so I can't clear out the inlined label. How can I detect the fact that text has been entered via autocomplete so that I can clear the labels? The js I'm using (from http://www.zurb.com/playground/inline-form-labels): $( document ).ready( function() { $( "label.inlined + .input-text" ).each( function( type ) { $( this ).focus( function() { $( this ).prev( "label.inlined" ).addClass( "focus" ); } ); $( this ).keypress( function() { $( this ).prev( "label.inlined" ).addClass( "has-text" ) .removeClass( "focus" ); } ); $( this ).blur( function() { if( $( this ).val() == "" ) { $( this ).prev( "label.inlined" ).removeClass( "has-text" ) .removeClass( "focus" ); } } ); } ); } ); Thanks! Bryan

    Read the article

  • how to show a large jpg image to the right in jqGrid's edit form ?

    - by cLee
    Is it possible to show a large (i.e. bigger than a thumbnail) jpeg image in the right-hand side of jqGrid's edit form ? Users want to look at a photo while entering data into fields ... they are describing things in the photo. I'm sure all things are possible with jQuery, but I don't know where to begin. thanks ... html: function afterSubmit(r, data, action) { // if session timeout returned: if (r.responseText == "logout") { window.location = '../scripts/logout.php'; } // if an error message is returned: if (r.responseText != "") { $('#submit_errors').html('Alert:'+r.responseText+''); // show div with error message $('#submit_errors').slideDown(); // hide error div after 10 seconds window.setTimeout(function() { $('#submit_errors').slideUp(); }, 10000); return false; // don't remove this! } return true; // don't remove this! } var lastsel; jQuery(document).ready(function(){ var mygrid = jQuery("#mobile_incidents").jqGrid({ url:'list.php?q=e', editurl:'edit.php', datatype: "json", // note: all column names are required even though some columns are hidden colNames:['Rec#','Date','Line','Photo'], colModel:[{ name:'id', index:'id', editable:true, editoptions: {readonly:'readonly'} }, { name:'mobile_discoveryDate', index:'mobile_discoveryDate', sortable:false, editable:true, edittype:'text', formatter:'date', formatoptions:{ srcformat:'Y/m/d', newformat:'m/d/Y' }, editoptions:{ size:12, maxlength:10, dataInit: function(element) { $(element).blur(); $(element).datepicker({dateFormat:'mm/dd/yyyy'}) } } }, { name:'mobile_lineName', index:'mobile_lineName', editable:true, sortable:false}, { name:'mobile_photo_name', index:'mobile_photo_name', editable:false, sortable:false} ], pager: '#mobile_incidents_pager', altRows: false, rowNum:10, rowList:[10,20], imgpath: '../include/images/jqgrid', viewrecords: true, emptyrecords:'No submissions found!', height: 260, sortname: 'id', sortorder: 'desc', gridview: true, scrollrows: true, autowidth: true, rownumbers: false, multiselect: false, subGrid:false, caption: '' }) .navGrid('#mobile_incidents_pager', // params: {add:false, edit:true, del:false, search:false, view:false, refresh:true, alertcap:' to edit:', alerttext:' . . . click on a row to highlight' }, // edit params: {top:50, left:5, editCaption: 'Edit Submission', bSubmit: 'Approve/Save', closeAfterEdit:true, afterSubmit:function(r,data){return afterSubmit(r,data,'edit');} }, {}, // add params {}, // delete params // search params: {multipleSearch: false}, // view params: {top: 150, left: 5, caption: 'View Mobile Rail Submission'} ); });

    Read the article

  • How to add Custom View +Relative Layout into ViewGroup

    - by TimothyMiller
    Hi I am creating a View where you can draw on the screen, using a view, where I would like to have a button/titlebar drawn at the top of the screen. Here is my current code public class FingerPaint extends Activity implements ColorPickerDialog.OnColorChangedListener { private Paint mPaint; private MyView mView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout main = new LinearLayout(this); mView = new MyView(this); main.addView(this.getLayoutInflater().inflate( R.layout.topbar, null )); main.addView(mView); main.bringChildToFront(mView); setContentView(main); // mView.addView(this.getLayoutInflater().inflate( R.layout.topbar, null )); mPaint = new Paint(); mPaint.setAntiAlias(true); mPaint.setDither(true); mPaint.setColor(0xFFFF0000); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeJoin(Paint.Join.ROUND); mPaint.setStrokeCap(Paint.Cap.ROUND); mPaint.setStrokeWidth(12); mBitmaps=new Bitmap[100]; location=0; actualSize=0; mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f); mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL); setContentView(main); } public class MyView extends View{ ......... } But when run, only the topbar.xml view is shown. I want the status bar from topbar and the rest down to be from the myView (for drawing on the screen like paint). Am I using ViewGroup properly?

    Read the article

  • Smoothing touch-based animation in iPhone OpenGL?

    - by quixoto
    I know this is vague, but looking for general tips/help on this, as it's not an area of significant expertise for me. I have some iPhone code that's basically an EAGL view handling a single touch. The app draws (using GL) a circle via triangle fan at the touch point, and moves it when the user moves the touch point, and re-renders the view then. When dragging a finger slowly, the circle keeps up and consistent with the finger as it moves. If I scribble my finger quickly back and forth across the screen, the rendering doesn't keep up with the touch motion, so you see an optical illusion of "multiple" discrete circles on the screen "at once". (Normal persistence of vision illusion). This optical illusion is jarring. How can I make this look more natural? Can I blur the motion of the circle somehow? Is this result the evidence of some bad frame rate issue? I see this artifact even when nothing else is being rendered, so I think this might just be as fast as we can go. Any hints or suggestions? Much appreciated. Thanks.

    Read the article

  • TinyMCE is glitchy in IE8

    - by Force Flow
    I'm using the jQuery version of TinyMCE 3.3.9.3 In firefox, it works fine (10 sec video depicting it in use): http://www.youtube.com/watch?v=TrAE0igfT3I In IE8 (in IE8 standards mode), I can't type or click any buttons. However, if I use ctrl+v to paste, then I can start typing, but the buttons still don't work (a 45 sec video depicting it in use): http://www.youtube.com/watch?v=iBSRlE8D8F4 The jQuery TinyMCE demo on TinyMCE's site works for me in IE8. Here's the init code: $().ready(function(){ function tinymce_focus(){ $('.defaultSkin table.mceLayout').css({'border-color' : '#6478D7'}); $('.defaultSkin table.mceLayout tr.mceFirst td').css({'border-top-color' : '#6478D7'}); $('.defaultSkin table.mceLayout tr.mceLast td').css({'border-bottom-color' : '#6478D7'}); } function tinymce_blur(){ $('.defaultSkin table.mceLayout').css({'border-color' : '#93a6e1'}); $('.defaultSkin table.mceLayout tr.mceFirst td').css({'border-top-color' : '#93a6e1'}); $('.defaultSkin table.mceLayout tr.mceLast td').css({'border-bottom-color' : '#93a6e1'}); } $('textarea.tinymce').tinymce({ script_url : 'JS/tinymce/tiny_mce.js', theme : "advanced", mode : "exact", theme : "advanced", invalid_elements : "b,i,iframe,font,input,textarea,select,button,form,fieldset,legend,script,noscript,object,embed,table,img,a,h1,h2,h3,h4,h5,h6", //theme options theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,selectall,|,undo,redo,|,cleanup,removeformat,|", theme_advanced_buttons2 : "bold,italic,underline,|,bullist,numlist,|,forecolor,backcolor,|", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "none", theme_advanced_resizing : false, //plugins plugins : "inlinepopups,paste", dialog_type : "modal", paste_auto_cleanup_on_paste : true, setup: function(ed){ ed.onInit.add(function(ed){ //check for addEventListener -- primarily supported by firefox only var edDoc = ed.getDoc(); if ("addEventListener" in edDoc){ edDoc.addEventListener("focus", function(){ tinymce_focus(); }, false); edDoc.addEventListener("blur", function(){ tinymce_blur(); }, false); } }); } }); }); Any ideas as to why it's not working in IE8?

    Read the article

  • can't get jquery livequery to with an update panel

    - by Jeremy
    I have some basic html inside an asp.net update panel. Using livequery, I set up autocomplete, blur and keydown events so that they all continue to be wired up after the update panel does a partial page load. When the page initially loads, all the events work fine but after the update panel does a partial page reload, none of the events wired up with livequery continue to work. Are there known issues with livequery and update panels? Html: <asp:UpdatePanel ID="upData" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:DataList ID="dlData" runat="server" DataSource='<%# this.Data %>' DataKeyField="ID"> <ItemTemplate> <table> <tr> <th class="required">Location</th> <td><asp:TextBox ID="txtFromLocation" MaxLength="10" CssClass="searchlocation fromlocation required" runat="server" Text='<%# Eval("FromLocation")%>'/><asp:RequiredFieldValidator ID="rvalFromLocation" runat="server" ControlToValidate="txtFromLocation" ValidationGroup="leg">*</asp:RequiredFieldValidator></td> </tr> </table> </ItemTemplate> </asp:DataList> </ContentTemplate> </asp:UpdatePanel> And then I have my javascript. Normally it has a bunch of other code, but I can reduce it down to this and still have the problem: $(document).ready(function() { $(".searchlocation").livequery(function() { $(this).keydown(function(event) {alert('test');}); }); });

    Read the article

  • GPGPU programming with OpenGL ES 2.0

    - by Albus Dumbledore
    I am trying to do some image processing on the GPU, e.g. median, blur, brightness, etc. The general idea is to do something like this framework from GPU Gems 1. I am able to write the GLSL fragment shader for processing the pixels as I've been trying out different things in an effect designer app. I am not sure however how I should do the other part of the task. That is, I'd like to be working on the image in image coords and then outputting the result to a texture. I am aware of the gl_FragCoords variable. As far as I understand it it goes like that: I need to set up a view (an orthographic one maybe?) and a quad in such a way so that the pixel shader would be applied once to each pixel in the image and so that it would be rendering to a texture or something. But how can I achieve that considering there's depth that may make things somewhat awkward to me... I'd be very grateful if anyone could help me with this rather simple task as I am really frustrated with myself. UPDATE It seems I'll have to use an FBO, getting one like this: glBindFramebuffer(...)

    Read the article

  • jQuery filename manipulation

    - by Adi
    Hi all, I am trying to do a fancy blur/fade effect (which means i need 2 images) but I only want to load 1 in the HTML (in case js is not active) and add the other filename via jQuery (copying and renaming the file/src) The pure html is along the lines of: <div id="work"> <div> <img src="css/images/abc1.jpg" width="360" height="227" alt="" /> </div> <div> <img src="css/images/xyz1.jpg" width="360" height="227" alt="" /> </div> </div> But the html after jquery has manipulated the DOM needs to be like: <div id="work"> <div> <img src="css/images/abc0.jpg" width="360" height="227" alt="" /> <img src="css/images/abc1.jpg" width="360" height="227" alt="" /> </div> <div> <img src="css/images/xyz0.jpg" width="360" height="227" alt="" /> <img src="css/images/xyz1.jpg" width="360" height="227" alt="" /> </div> </div> The question is, what is the jQuery to clone/copy the relative images and then rename the src? Any help would be much appreicated. A.

    Read the article

  • How to select form input based on label inner HTML?

    - by Shane
    I have multiple forms that are dynamically created with different input names and id's. The only thing unique they will have is the inner HTML of the label. Is it possible to select the input via the label inner HTML with jQuery? Here is an example of one of my patient date of birth blocks, there are many and all unique except for innerHTML. <div class="iphorm-element-spacer iphorm-element-spacer-text iphorm_1_8-element-spacer"> <label for="iphorm_081a9e2e6b9c83d70496906bb4671904150cf4b43c0cb1_8">events=Object { mouseover=[1], mouseout=[1]}handle=function()data=Object { InFieldLabels={...}} Patient DOB <span class="iphorm-required">*</span> </label> <div class="iphorm-input-wrap iphorm-input-wrap-text iphorm_1_8-input-wrap"> <input id="iphorm_081a9e2e6b9c83d70496906bb4671904150cf4b43c0cb1_8" class="iphorm-element-text iphorm_1_8" type="text" value="" name="iphorm_1_8">events=Object { focus=[1], blur=[1], keydown=[1], more...}handle=function() </div> <div class="iphorm-errors-wrap iphorm-hidden"> </div> This is in a Wordpress Plugin and because we are building to allow employees to edit their sites (this is actually a Wordpress Network), we do not want to alter the plugin if possible. Note that the label "for" and the input "id" share the same dynamic key, so this might be a way to maybe get the id, but wanted to see if there is a shorter way of doing this.

    Read the article

  • Video-codec rater by image comparison algorithm?

    - by Andreas Hornig
    Hi, perhaps anyone knows if this is possible. comparing image quality is almost imposible to describe without subjective influences. When someone rates an image quality as good there is at least one person, that doesn't think so. human preferences are always different. So, I would like to know if there is away to "rate" the image quality by an algorithm that compares the original image to the produced one in following issues colour change(difference pixel by pixel blur rate artifacts and macroblocking the first one would be the easiest one because you could check just the diffeence in colours and can give 3 values in +- of each hex-value both last once I don't know if this is possible, but the blocking could be detected by edge-finding. and the king's quest would be to do that for more then just one image, because video is done with several frames. perhaps you expert programmers could tell me, if such an automated algo can be done to bring some objective measurement divice into rating image quality. this could perhaps calm down some h.264 is better than x264 and better than vp8 and blaaah people :) Andreas 1st posted here http://www.hdtvtotal.com/index.php?name=PNphpBB2&file=viewtopic&p=9705

    Read the article

  • Custom Modal Window in WPF?

    - by Dan Bryant
    I have a WPF application where I'd like to create a custom pop-up that has modal behavior. I've been able to hack up a solution using an equivalent to 'DoEvents', but is there a better way to do this? Here is what I have currently: private void ShowModalHost(FrameworkElement element) { //Create new modal host var host = new ModalHost(element); //Lock out UI with blur WindowSurface.Effect = new BlurEffect(); ModalSurface.IsHitTestVisible = true; //Display control in modal surface ModalSurface.Children.Add(host); //Block until ModalHost is done while (ModalSurface.IsHitTestVisible) { DoEvents(); } } private void DoEvents() { var frame = new DispatcherFrame(); Dispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(ExitFrame), frame); Dispatcher.PushFrame(frame); } private object ExitFrame(object f) { ((DispatcherFrame)f).Continue = false; return null; } public void CloseModal() { //Remove any controls from the modal surface and make UI available again ModalSurface.Children.Clear(); ModalSurface.IsHitTestVisible = false; WindowSurface.Effect = null; } Where my ModalHost is a user control designed to host another element with animation and other support.

    Read the article

  • CSS box shadow on container div causes scrollbars

    - by kaile
    I have a website with the following setup: <div id="container"> <div id="header"></div> <div id="content"></div> <div id="clearfooter"></div> </div> <div id="footer"></div> I use the clearfooter and a footer outside the container to keep the footer at the bottom of the page when there isn't enough content. My problem is that I would like to apply a box shadow on the container div in the following way: #container {width:960px; min-height:100%; margin:0px auto -32px auto; position:relative; padding:0px; background-color:#e6e6e6; -moz-box-shadow: -3px 0px 5px rgba(0,0,0,.8), 3px 0px 5px rgba(0,0,0,.8);} #header {height:106px; position:relative;} #content {margin:0px; padding:10px 30px 10px 30px; position:relative;} #clearFooter {height:32px; clear:both; display:block; padding:0px; margin:0px;} #footer {height:32px; padding:0px; position:relative; width:960px; margin:0px auto 0px auto;} As you can see its a drop shadow on on each side of the container div. However, in doing this, when the content doesn't take up the full height, there are still scroll bars caused by the shadow pushing past the bottom of the footer due to the blur. Is there some way of preventing the shadow from going past the edge of the container div and causing a scrollbar? Thanks for your help!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13  | Next Page >