Questions tagged [shadow]

Questions related to drawing or setting shadows on an object. It refers to graphical shadow in user interfaces and 3D rendering and not to be confused with conceptual shadows (copies) of an object, library, database etc.

Examples of a graphical shadow: enter image description here enter image description here

2031 questions
22
votes
6 answers

How can I add shadow to a circle UIImageView or UIView?

I am trying to make a circle UIImageView, and it works. Below is the way I use to make it: [self.pic.layer setMasksToBounds:YES]; [self.pic.layer setCornerRadius:50.0]; I would like to add some shadow to the UIImageView. The below code does add…
Newbie
  • 2,775
  • 6
  • 33
  • 40
21
votes
1 answer

Does the Android operating system have files like /etc/passwd, /etc/shadow, and /etc/group?

If not, how does android determine whether a user belongs to a certain group?
sunway
  • 237
  • 1
  • 2
  • 7
21
votes
6 answers

How to remove UINavigationBar inner shadow in iOS 7?

Inner shadow example I'm trying to put nav bar below the other one to make it look like one tall nav bar. But in iOS 7 UINavigationBar now has inner shadow on top and on bottom of it. I really need to remove it. But I didn't found any solution. It…
TOVVV
  • 211
  • 1
  • 2
  • 4
20
votes
3 answers

Shadow inside of a div

Is it possible to display a shadow inside a div box without using pictures? Instead I want to use css commands. So is there some command like: -webkit-box-shadow: 1px inset; ?
Tim Daubenschütz
  • 2,053
  • 6
  • 23
  • 39
20
votes
3 answers

How to set shadow effect on ImageView

I'm tryin' to set shadow on an Image view on Xamarin.Forms (targeting the Android platform) and I got some examples on the internet. The PCL code is quite simple, and the platform seemed pretty easy too. The recipe available at the official xamarin…
Diego Rafael Souza
  • 5,241
  • 3
  • 23
  • 62
20
votes
1 answer

Having major problems transforming frustum from camera space to light space for shadow mapping

I'm trying to implement cascaded shadow mapping in my OpenGL/C++ renderer. I've successfully managed to implement directional shadow mapping when the ortho matrix is built from arbitrary numbers and stays at the origin of the scene. From…
Haydn V. Harach
  • 1,265
  • 1
  • 18
  • 36
20
votes
0 answers

"setElevation" vs "setTranslationZ" vs "setZ"

Lollipop has all those new functions for the "View" class. What exactly are the differences between them, and why do we need so many functions for them? I've read the docs, and I want to understand (or better understand) the difference and the need…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
19
votes
2 answers

TextView adding gradient AND shadow

I have a problem. I would like to have a textview with a gradient as color. And a black shadow behind it. The problem is that the shadow is using the color of the gradient in stead of using the called color (Color.BLACK) My code is: numberTextView =…
w.donk
  • 3,252
  • 1
  • 18
  • 15
19
votes
4 answers

html canvas shadow being applied to everything

If you define a shadow ONCE, then it applies to all "graphics" on the canvas from thereon after (which is what it's supposed to do). Sample: http://flanvas.com/development/flanvas/test.html Does anyone know best practice to turn the shadow off after…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
19
votes
2 answers

How to prevent Android's drawBitmap from only drawing black images?

As per the original question, The end result is a rounded-rect png in an ImageView with a natural looking drop shadow. I have the shadow working, but when it draws, it makes the entire image black. How can I prevent the original image (definitely…
coneybeare
  • 33,113
  • 21
  • 131
  • 183
18
votes
4 answers

CoreGraphics Quartz drawing shadow on transparent alpha path

Searching the web for about 4 hours not getting an answer so: How to draw a shadow on a path which has transparency? - (void)drawRect:(CGRect)rect { CGContextRef c = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(c, 2); …
user207616
18
votes
2 answers

Drawing shadow with Quartz is slow on iPhone & iPad. Another way?

I was pretty excited when I found out just how easy it is to add shadows to my UIViews on the iPhone/iPad. Just add the framework in Xcode, add the import to the top of the file: #import Then…
Moduspwnens
  • 525
  • 1
  • 5
  • 9
17
votes
3 answers

UIButton w/ gradient, rounded corners, border, and drop shadow

There are a few similar questions on the site, but I'm looking for something specific and slightly different. I followed the direction given here: http://www.cimgf.com/2010/01/28/fun-with-uibuttons-and-core-animation-layers/ to subclass UIButton in…
jinglesthula
  • 4,446
  • 4
  • 45
  • 79
17
votes
4 answers

How to apply shadow to react native View without affecting inner view elements?

I would like to know how to apply shadow only to the main outer view. Here on applying shadow, it's getting applied to all the inner elements
Jacob Lukose
  • 181
  • 1
  • 4
16
votes
4 answers

Adding drop shadow to UITableView

I've a plain UITableView (not grouped) that I want to add a dropshadow to left and to the right. How can I achieve this? I've tried: [self.tableView.layer setShadowColor:[[UIColor whiteColor] CGColor]]; [self.tableView.layer…
Fred Collins
  • 5,004
  • 14
  • 62
  • 111