dropshadow

How to add a blurred drop shadow to a button?

此生再无相见时 提交于 2019-11-29 23:23:36
I need to add blurred drop shadow to my button: I tried to create background with layer-list xml drawable, but it not looks like blur. <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Drop Shadow Stack --> <item> <shape> <corners android:radius="45dp" /> <padding android:bottom="2dp" android:left="1dp" android:right="1dp" android:top="1dp" /> <stroke android:width="6dp" android:color="#007879E8" /> </shape> </item> ////// 10 more items <item> <shape> <corners android:radius="45dp" /> <padding android:bottom="2dp" android:left=

Drop shadow on a div container?

陌路散爱 提交于 2019-11-29 21:15:49
I have a searchbox with auto-suggest that pops a div up underneath it with multiple search string suggestions (like google). Is it possible to have drop shadow on the auto-suggest box with CSS or will I need a script of some sort? I tried a background image but the number of suggests can vary from 1 to 10 or 15. I'd prefer something that works in IE6+ and FF2+ if possible. Thanks! Scott H This works for me on all my browsers: .shadow { -moz-box-shadow: 0 0 30px 5px #999; -webkit-box-shadow: 0 0 30px 5px #999; } then just give any div the shadow class, no jQuery required. CSS3 has a box-shadow

Win32: How to make drop shadow honor non-rectangular Layered window?

对着背影说爱祢 提交于 2019-11-28 21:22:32
i've created a layered window by adding the the WS_EX_LAYERED extended style: wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED; Windows will use black as the chroma key color value. i'm going to leave a large border of black to make the problem obvious: After the window is constructed, i tell it to use black as a chroma-key color : SetLayeredWindowAttributes(hwnd, 0x00000000, 255, LWA_COLORKEY); Now the popup layered window appears partially transparent: The problem is the final step. i want to use CS_DROPSHADOW class style, available since Windows XP, to create a drop-shadow: wndClass

WPF drop shadow

佐手、 提交于 2019-11-28 18:14:12
Currently I'm making something in WPF that has a border that contains a grid and other controls. The problem I'm facing is that whenever I set the Border.Effect property to a drop shadow effect every control contained in the border now has a drop shadow. Is there a way to set the shadow just to the border and not every control contained in the border? Here is a short example of my code: <Grid> <Border Margin="68,67,60,67" BorderBrush="Black" BorderThickness="1" CornerRadius="10"> <Border.Effect> <DropShadowEffect/> </Border.Effect> <Rectangle Fill="White" Stroke="Black" Margin="37,89,118,98" /

Algorithm for fast Drop shadow in GDI+

独自空忆成欢 提交于 2019-11-28 17:59:28
What is an efficient way to add a drop-shadow to an image in GDI? Right now i start with my image: i use ImageAttributes and a ColorMatrix to draw the image's alpha mask to a new image: colorMatrix = ( ( 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0), ( 0, 0, 0, 0, 0), (-1, -1, -1, 1, 0), ( 1, 1, 1, 0, 1) ); i then apply a Gaussian Blur convolution kernel, and offset it slightly: And then i draw my original image back over top: Problem is that it's just too slow, it takes about 170ms to generate the image with drop-shadow, verses 2ms without the drop-shadow (70x slower): with drop shadow: 171,332 µs without

css3 drop shadow under another div, z-index not working [duplicate]

天大地大妈咪最大 提交于 2019-11-28 16:54:35
问题 This question already has an answer here: Why does z-index not work? 4 answers i'm trying to use a drop shadow to make it look like one div (the header) is "above" another. my problem is that the "middle" div is covering the drop shadow. i tried using z-index to put the header div about the middle div, but it's not working (the shadow is still being covered). when i put a break between the divs, i can see the shadow and therefore i know that part of the code is working properly. i have the

Win32: How to make drop shadow honor non-rectangular Layered window?

我们两清 提交于 2019-11-27 13:47:02
问题 i've created a layered window by adding the the WS_EX_LAYERED extended style: wndClass.ExStyle = wndClass.ExStyle | WS_EX_LAYERED; Windows will use black as the chroma key color value. i'm going to leave a large border of black to make the problem obvious: After the window is constructed, i tell it to use black as a chroma-key color: SetLayeredWindowAttributes(hwnd, 0x00000000, 255, LWA_COLORKEY); Now the popup layered window appears partially transparent: The problem is the final step. i

Adding a drop shadow to NSString text in a drawRect: method without using UILabel

半腔热情 提交于 2019-11-27 13:38:46
问题 I'd like to add a drop shadow to text drawn using the iOS supplied NSString (UIStringDrawing) category method: - (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width withFont:(UIFont *)font minFontSize:(CGFloat)minFontSize actualFontSize:(CGFloat *)actualFontSize lineBreakMode:(UILineBreakMode)lineBreakMode baselineAdjustment:(UIBaselineAdjustment)baselineAdjustment; Clearly, there's no drop shadow option. Yes, one could use a UILabel here and get drop shadow properties to set, but that

Drop Shadow On A Borderless WinForm

倾然丶 夕夏残阳落幕 提交于 2019-11-27 10:53:34
问题 I'm trying to drop a shadow around the whole form just like the first picture, except that that is a WPF, not a WinForm. now I want to drop the same shadow on a winform. This is what I want..¬ Not this..¬ 回答1: In WinForms, you can just override the form's protected CreateParams property and add the CS_DROPSHADOW flag to the class styles. For example: public class ShadowedForm : Form { protected override CreateParams CreateParams { get { const int CS_DROPSHADOW = 0x20000; CreateParams cp =

Add drop shadow effects to EditText Field

为君一笑 提交于 2019-11-27 07:01:26
I am trying to design an EditText Field having Shadows (bottom and right side) like this tried googling & hunted many SO discussions but all are for TextView not EditText. This is my code adding shadow to Input Text but not to TextField <EditText android:id="@+id/txtpin" android:maxLength="4" android:layout_marginLeft="10dp" android:layout_height="37dp" android:gravity="center_horizontal" android:inputType="textPassword" android:longClickable="false" android:layout_width="160dp" android:shadowColor="@color/Black" android:shadowDx="1.2" android:shadowDy="1.2" android:shadowRadius="1.5" android