FAQ Database Discussion Community


Lollipop: Had trouble showing a shadow under the overflow menu

android,toolbar,shadow
I had some trouble getting the shadow to show in a certain Activity on Lollipop devices. Despite the theme of the Activity and the Support Toolbar used was exactly the same as it was in any other activities. I was confused why I couldn't get the shadow to show in...

CALayer shadowColor not changing

ios,objective-c,calayer,shadow
So I set the shadow of a layer of an UIView correctly the first time (it shows perfectly fine) but when I try to change the color (nothing else, just the layer.shadowColor) it won't update in the view. It still shows the original color. I already tried layer setNeedsDisplay without...

How it is possible to get rid of spurious artifacts of Shadow Mapping?

javascript,webgl,shader,shadow
Spurious artifacts in case of creation of shadows through shadow mapping. I can't understand why many shadows are drawn, and from where they originate? example: example...

CGContextSetShadowWithColor puts shadows on top of the text casting the shadow

ios,text,core-graphics,shadow
I am using CGContextSetShadowWithColor and core graphics to draw shadowed text. The shadow appears, but it also seems to "muddy" the actual text itself which is casting the shadow (which should be pure white). It is as if it is casting the shadow on top of the text (but not...

How to get rid of the bottom shadow in label of the css tabs

css,tabs,positioning,shadow,box-shadow
I'm making the css tabs with shadows. How can I get rid of the bottom shadow in label? Here's an example: http://codepen.io/ekscentrysytet/pen/QbNdEB I've tried z-index: -1; for label:after but shadow disappears....

Mock native method with a Robolectric Custom shadow class

class,mocking,shadow,robolectric
I have a class with a regular method and a native method that I'd like to mock: public class MyClass { public int regularMethod() { ... } public void native myNativeMethod(); } I am using Robolectric to test my app, and I am trying to figure out a way to...

How draw rounded rectangle with alpha blending in OpenGL immediate mode

opengl,shadow,rectangles,alphablending,immediate-mode
I have found some code that will allow me to draw a rounded rectangle in OpenGL immediate mode (here). What I would like to do it decrease the alpha, the further away from the centre of the rectangle - as would find under a Windows/Mac window or dialog for example...

SKLightNode cast shadow issue

sprite-kit,shadow,skspritenode,sklightnode
I have been unsuccessful in getting a SKSpriteNode to cast a shadow AND also be made to disappear when going into a shadow from the same light source. I am able to do one of the two but not both. According to the docs: If the sprite is inside a...

Javascrip Adding function to custom elements in the shadow root

javascript,shadow,custom-element
I'm writing an app using shadow root, I found my self using shadow.children[i].addEventListener('click', fn); so much, so I tried to create a custom function to shorthand it, so I wrote: var $shadow = function(shadow, el, fn){ console.log(shadow); console.log(el); var children = shadow.children; for (var i = 0; i < children.length;...

Shadow Map Positioning and Resolution

c++,opengl,3d,shadow,shadow-mapping
I'm currently learning C++ and OpenGL and was wondering if anyone could walk me through what is exactly happening with the below code. It currently calculates the positioning and resolution of a shadow map within a 3D environment. The code currently works, just looking to get a grasp on things....

Shadow on UIButton text only (not background)

ios,objective-c,cocoa-touch,uibutton,shadow
I have a set of UIButtons with background colors. when the user taps one, I want only the button's text to have a shadow all around it (to show that it has been selected). However, when I add the shadow, the shadow appears over the whole button (background and all),...

Adding shadow to my text?

html,css,text,shadow
Can anyone please help me to add shadow to this: http://jsfiddle.net/qzeohf20/3/ .rainbow { font-size: 35px; text-align: center; margin-top: 50px; margin-bottom: 50px; padding: 10px; font-family: Impact, Haettenschweiler, 'Franklin Gothic Bold', Charcoal, 'Helvetica Inserat', 'Bitstream Vera Sans Bold', 'Arial Black', 'sans serif'; background-image: -webkit-gradient( linear, left bottom, right top, color-stop(0, #C6781D), color-stop(1,...

How to remove FloatingActionButton's surrounding shadow?

android,shadow,floating-action-button
I'm trying to replace the third party FloatingActionButton with the native one which is packaged in library com.android.support:design:22.2.0.The default look has a dark shadow around the image,How can I get rid of it? I know the former one provides with the method setShadow(),but I just can't find similar one from...

How to add material-style shadow to canvas drawn elements?

android,canvas,shadow,material-design,elevation
As the documentation says, you can add and customize the material design shadow-style by android:elevation. This works fine with all elements I came across yet. But what if I want to get the same (or nearly the same) behavior for shapes I draw on a Canvas? - Currently I'm playing...

Drop shadow for Floating Action Button

android,android-support-library,shadow,floating-action-button
I'm creating my own floating action button. For this I'm using a RippleDrawable (created by me) and a ShadowDrawable (also created by me). The problem I'm facing is that my ShadowDrawbale does not cast perfect shadow for the respective button. The code for my ShadowDrawable is as follows: public...

Spotlight with shadows becomes square-like

c++,opengl,graphics,shader,shadow
I've been following a two part tutorial on shadow mapping from OGLDev (part 1, part 2) for a couple of days now, and I've nearly finished implementing it. My problem is that when I enable shadow maps the illuminated region which shadows appear in appears as a "strip" and I'm...

How do I Set the Shadow around TextView

android,textview,shadow
<TextView android:id="@+id/text" android:layout_width="225dp" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:layout_toRightOf="@+id/left" android:background="@anim/chatitemshaodow" android:fontFamily="calibri" android:padding="8dp" android:textColor="#636363" android:textSize="17dp" /> This is my TextView controls and I want set the shadow around TextView. I am able to set the Showdown on text in TextView but I am unable to set shadow round on TextView. I want to set...

Using shell command output within VI editor

shell,command-line,vi,shadow
I'm just walking my very first steps with vi-like editors and i would like to know if it's possible to insert the output of a shell command within a line when, for example, editing /etc/shadow with vipw -s prueba4::16586:0:99999:7::: ~ ~ ~ ~ ~ ~ ~ ~ ~ My goal...

How to remove button shadow (android)

android,button,shadow
I want to remove the shadow from the button to make it seem more flat. I have this right now: But I want this: ...

iOS Set shadow radius is not working

ios,uilabel,shadow,radius
UILabel set shadow radius is not working. [self.testLabel.layer setShadowColor:[[UIColor purpleColor] CGColor]]; [self.testLabel.layer setShadowOffset:CGSizeMake(3, 3)]; [self.testLabel.layer setShadowRadius:5.0f]; [self.testLabel.layer setMasksToBounds:YES]; My code (Google Drive) https://drive.google.com/file/d/0B5UPvOBH3cqvOFlvZHhKdlNhb0E/view?usp=sharing I'm sorry if this's a repeat question. Thanks a lot....

css div gradient shadow/border

html,css,css3,design,shadow
I am trying to achieve this: I couldn't find anything like it, but here is my failed attempt: #one { width: 200px; height: 100px; background-color: white; box-shadow: 0px 0px 20px #2D8DBD; left: 50px; display: inline-block; margin-right: -100px; } #two { width: 200px; height: 100px; background-color: white; box-shadow: 0px 0px 20px...

Shaded tittle does not displayed properly

html,css,colors,background-color,shadow
I list my projects here. All share the same style for the tittle, with a dark background for the inner body of the border the tittle lives in. However, my latest project got a logo ( :) ) which does not allow for a dark background. The reason as you...

The right way to set z-index

css,z-index,shadow
I have that html <div id="menu"> <a class="active"></a> </div> <div id="content"></div> And that css #menu { position:absolute; z-index:1; } #content { position:absolute; z-index:2; text-shadow: -10px 3px 10px rgba(0,0,0,.23),0 3px 10px rgba(0,0,0,.16); } #menu a.active:after { position:absolute; z-index:3; text-shadow: -10px 3px 10px rgba(0,0,0,.23),0 3px 10px rgba(0,0,0,.16); } I want a.active:after was...

GLSL soft planar shadows: matrix transformation

opengl,matrix,glsl,shadow,affinetransform
I'm adding some modest features to an older video game engine. It has simple planar shadows, using the stencil buffer and a projection matrix popularized in SGI's cookbook years ago. These work reasonably well, except they do not fade in intensity according to the attenuation of the light source. That's...

set inner shadow border to be ontop of image inside div

css,html5,border,shadow
I want a border inside the div display when an image is hover, but its showing the border on the back side of the div. I tried using z-index but doesnt work either. here is my code https://jsfiddle.net/ormxn1dn/2/ .thumb_images{ float:left; width: 90px; height: 60px; background-color:#CCC; text-align:center; margin-right: 5px; } .thumb_images:hover{...

Stripped shadows on collada objects

javascript,three.js,shadow,stripes,directional-light
I have a scene with two collada objects and a directional light. The first collada is pretty much a plane, and the second one is made of multiple boxes. It appears that when the scene is rendered, some "side" shadows are really stripped, although the shadows casted on ground are...

createjs.Shadow alpha

alpha,shadow,createjs
Can the alpha of a drop shadow created with createjs.Shadow be controlled independently of the object it's attached to? I tried, simply: myObject.shadow = new createjs.Shadow("#000000",200,200,15); myObject.shadow.alpha=0.2; But that's a no go. Can't find anything in the API docs, but those are all pretty damn confusing to begin with....