gradient

Gradient colors from d3.scale.category10() with opacity change on a svg circle?

坚强是说给别人听的谎言 提交于 2019-12-08 08:43:01
问题 I am trying to apply the colors from the color = d3.scale.category10(); var to the gradient for the circle svg, what am I doing wrong? All I am seeing is the first color of the color = d3.scale.category10(); (which is blue) to 0% opacity gradient but that is all. If I take the gradient out then I see the range I want which is from 1-4? Thanks in advance! var nodes = d3.range(300).map(function() { return {radius: Math.random() * 12 + 4}; }), root = nodes[0], color = d3.scale.category10(); root

Gradient for IE6 not working

自作多情 提交于 2019-12-08 07:45:03
问题 I have several divs on a webpage that use the IE css filter to create a gradient effect for the background. The page is viewed primarily in IE6 (I have no other choice unfortunatly) and displays fine on my development machine. I have also tried viewing the page using IETester and the page also displays fine in IE 5.5 to IE 8. However, when viewing the page on the "live" machine, the gradients don't show up at all. The browser on the "live" machine is IE 6 with sp3. I have checked the div's

Estimate Image line gradient ( not pixel gradient)

十年热恋 提交于 2019-12-08 07:14:50
问题 I have a problem whereby I want to estimate the gradient of the line on the contour. Please note that I dont need the pixel gradient but the rate of change of line. If you see the attached image, you will see a binary image with green contour. I want to label each pixel based on the gradient of the pixel on the contour. Why I need the gradient is because I want to compute the points where the gradient orientation changes from + to - or from - to +. I cannot think of a good method, to estimate

Vertically-repeating horizontal gradient in CSS

冷暖自知 提交于 2019-12-08 06:13:29
问题 I'm having trouble coming up with a pure CSS mechanism to get a particular background pattern happening. What I'm looking for is a horizontal gradient that is also repeated vertically, with a gap between each instance. Example: (source: howsfamily.net) I can get the horizontal effect easily enough background: linear-gradient(to left, white, red, white); background-size: 100% 50px; background-repeat: no-repeat; } I can get the vertical effect (without the horizontal gradient) background:

Imagemagick loses gradient on image on Ubuntu

怎甘沉沦 提交于 2019-12-08 04:39:07
问题 I am using Ubuntu 11.10. I have installed ImageMagick from the latest source package. Here is the output from "convert -version" Version: ImageMagick 6.7.6-6 2012-04-19 Q16 http: // www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP I am trying to convert an svg into a png which works great unless I have a gradient on some part of the image. Here is the command I am running: convert RedPoweredByPenguins.svg redpenguin.png Here is the SVG: http:/

opengl es: drawing a texture with fading gradient

风格不统一 提交于 2019-12-08 04:32:42
问题 I am completely new to opengl and need some help in drawing a texture with gradient applied over it. Now I am drawing a texture with the following code: glPushMatrix(); glBindTexture(GL_TEXTURE_2D,fcr.texture); glTranslatef(trans, 0, 0); glScalef(sc,sc,1.0); glColor4f(1.0,1.0,1.0,0.4); glDrawArrays(GL_TRIANGLE_STRIP,0,4); glColor4f(1,1,1,1); In the above code glColor4f(1.0,1.0,1.0,0.4); applies transparency to the drawn image. Now instead of a solid transparent color, I would like to apply a

How change css using variables to make an animation

半世苍凉 提交于 2019-12-08 04:11:14
问题 How can I transition CSS values using JavaScript? I made this code, but it isn't working: var num = 100; function fillDiv{ var a=document.getElementById("principal"); for (var i = 0; i<100; i++){ num=num-25; a.style.background="-moz-radial-gradient(#FFFFFF "+num+"%, #006699 200%);"; if (num==0){ break; } } In the debug window all gone good, but when I check it on elements tag the value hasn't changed. 回答1: As explained in comments, the for loop is too quick to notice the effect, Instead you

CSS gradient above background pattern

不打扰是莪最后的温柔 提交于 2019-12-08 03:38:13
问题 I want to make pattern background and a white to black (with transparency) gradient above it. How to work it out and also make it work cross-browser? I'm starting with Mozilla and I've tried to use code below: background: url(../images/bg_pattern.gif), -moz-linear-gradient( rgba(255, 255, 255, 0.5) 5%, rgba(130, 130, 130, 0.5) 95% Of course this does not work. So how to work it out? How would the code look for other browsers? Does IE support many backgrounds and transparency? I think it doesn

Scaling gradient backgrounds in CSS

£可爱£侵袭症+ 提交于 2019-12-08 03:30:17
问题 first time asking, please go easy on me I'm trying to make a background gradient for a web app that uses JQuery Mobile. I'm clueless about CSS and UI design in general. I want the gradient to fill the entire page's space. Right now, it fills up to the original window's size, but "cuts off" when scrolling down. Most suggestions point to this: html { height: 100%; } ...which doesn't work for me. Here is what I have: content: " "; width: 100%; height: 100%; float: left; position: relative; z

adding gradient to UIView in drawRect

眉间皱痕 提交于 2019-12-08 03:10:14
问题 I am trying to add a CAGradientLayer in my drawRect, the code is the following: - (void)drawRect:(CGRect)rect { CAGradientLayer *gradientOverlay = [CAGradientLayer layer]; CGColorRef grayColor = [UIColor colorWithRed:37/255.f green:37/255.f blue:37/255.f alpha:1.0].CGColor; CGColorRef blueColor = [UIColor colorWithRed:23.0/255.0 green:171.0/255.0 blue:219.0/255.0 alpha:1.0].CGColor; gradientOverlay.colors = [NSArray arrayWithObjects: (id) grayColor, (id) grayColor, (id) blueColor, nil];