dropshadow

Main NSWindow shadow doesn't change like child windows

我们两清 提交于 2019-12-07 07:27:15
问题 The primary window in my app is borderless: [self.window setStyleMask:NSBorderlessWindowMask]; From that window, I also open other child windows. When I click around between those other child windows I see the drop shadow of those child windows get darker/larger when that child window gets clicked and becomes the focused window. However, my main window's shadow doesn't change when it loses or gains focus. So, there isn't much user feedback to tell them that original primary window has become

Glow effect on MouseEnter WPF

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 00:37:34
问题 I'm new in WPF(c#). I need make a glow effect around image control using triggers . How can I do make glow effect on mouse-enter event? I want to use your answer i my style. My effect is: <DropShadowEffect x:Key="MyEffect" ShadowDepth="0" Color="Blue" Opacity="1" BlurRadius="20"/> I see many links but they don't work. 回答1: To add glow to Image control you need to set Effect to your DropShadowEffect when IsMouseOver=True , something like this: <Image Source="/WpfApplication1;component/myimage

Is there any way to do a Material-style shadow in API < 21 (5.0 Lollipop)?

余生长醉 提交于 2019-12-06 19:49:58
问题 Material design makes a huge emphasis on the metaphor of "sheets of paper". To make these, shadows are essential. Since Material design is a philosophy and not an API (despite it being built into L), this should be done anywhere (Windows Forms, HTML/CSS, etc.). How do I do this in Android API 14 to 20? Note that premade PNGs won't really be that practical for circular and other non-square shapes. 回答1: If you're not worried about backwards compatibility past Lollipop, you can set the elevation

UIView shadow issue with orientation

纵然是瞬间 提交于 2019-12-06 10:04:08
I have UiTableView within UiView . I want to set corner radius & shadow to UIView . I am using this code to give shadow with corner and its working fine. myView.backgroundColor = [UIColor clearColor]; [myView.layer setCornerRadius:10.0f]; [myView.layer setBorderColor:[UIColor lightGrayColor].CGColor]; [myView.layer setBorderWidth:1.0f]; [myView.layer setShadowColor:[UIColor blackColor].CGColor]; [myView.layer setShadowOpacity:0.8]; [myView.layer setShadowRadius:3.0]; [myView.layer setShadowOffset:CGSizeMake(2.0, 2.0)]; // below line is for smooth scrolling [myView.layer setShadowPath:

How to add shadow on custom text?

南笙酒味 提交于 2019-12-06 05:23:28
问题 i tried with xml file and with code to add shadow to custom font without any success my code is TextView text=(TextView)findViewById(R.id.text1); Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/gillsans.ttf"); text.setTypeface(tf); 回答1: use this: Activity.class : TextView text=(TextView)findViewById(R.id.text1); Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/gillsans.ttf"); text.setTypeface(tf); //////////// Shader textShader=new LinearGradient(2, 0, 4, 60, new int[]

Draw Drop Shadow Outside UIView

不问归期 提交于 2019-12-06 02:44:10
问题 Background I have a UIView with the following properties: alpha = 1 backgroundColor = white, with 0.35 opacity rounded corners drop shadow Code This is how I create the drop shadow: ( UIView extension) self.layer.masksToBounds = false self.layer.shadowColor = UIColor.darkGrayColor().CGColor self.layer.shadowOffset = CGSizeMake(0, 5) self.layer.shadowOpacity = 0.35 self.layer.shadowPath = UIBezierPath(roundedRect: self.bounds, cornerRadius: self.layer.cornerRadius).CGPath Results This results

Add drop shadow to PNG using Cocoa

↘锁芯ラ 提交于 2019-12-05 17:33:13
I have some PNGs with transparent backgrounds that I would like to add shadows to programatically. I've seen examples of adding shadows to square objects, but haven't seen any with complex shapes. So the two steps I think I'd have to do would be: Isolate the PNG shape Draw a shape behind the PNG that is blurred, faded, and offset. I don't have much experience with drawing within Cocoa, so any insight on where to begin would be much appreciated! Screenshot: (source: iworkinprogress.com ) Simplest way is to call CGContextSetShadow in your drawRect: before you draw the images. - (void)drawRect:

Main NSWindow shadow doesn't change like child windows

拥有回忆 提交于 2019-12-05 13:56:48
The primary window in my app is borderless: [self.window setStyleMask:NSBorderlessWindowMask]; From that window, I also open other child windows. When I click around between those other child windows I see the drop shadow of those child windows get darker/larger when that child window gets clicked and becomes the focused window. However, my main window's shadow doesn't change when it loses or gains focus. So, there isn't much user feedback to tell them that original primary window has become the focus again. Do I need to override something in my borderless window subclass to enable the shadow

Glow effect on MouseEnter WPF

橙三吉。 提交于 2019-12-05 05:07:48
I'm new in WPF(c#). I need make a glow effect around image control using triggers . How can I do make glow effect on mouse-enter event? I want to use your answer i my style. My effect is: <DropShadowEffect x:Key="MyEffect" ShadowDepth="0" Color="Blue" Opacity="1" BlurRadius="20"/> I see many links but they don't work. To add glow to Image control you need to set Effect to your DropShadowEffect when IsMouseOver=True , something like this: <Image Source="/WpfApplication1;component/myimage.png"> <Image.Style> <Style TargetType="{x:Type Image}"> <Style.Triggers> <Trigger Property="IsMouseOver"

Is there any way to do a Material-style shadow in API < 21 (5.0 Lollipop)?

孤者浪人 提交于 2019-12-05 01:56:03
Material design makes a huge emphasis on the metaphor of "sheets of paper". To make these, shadows are essential. Since Material design is a philosophy and not an API (despite it being built into L), this should be done anywhere (Windows Forms, HTML/CSS, etc.). How do I do this in Android API 14 to 20? Note that premade PNGs won't really be that practical for circular and other non-square shapes. If you're not worried about backwards compatibility past Lollipop, you can set the elevation Attribute directly in the XML android:elevation="10dp" Otherwise you have to set it in Java using the