gradient

Android “Advanced” Gradients - 'thumb' positions?

試著忘記壹切 提交于 2019-12-03 03:53:19
I am trying to create a gradient drawable to depict a ratio of something. As a general example, lets say you were looking at a listview containing a fleet of cars. The background could be a fuel gauge - I don't want a smooth, wide transition. I want a very tight transition, and I want to be able to set where that transition takes place. Here's what I'm staring with, but I'm not getting very far. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#D2E3D3" android:endColor="#E6E6E3"

Gradient effect for triangle shape borders

不问归期 提交于 2019-12-03 03:47:27
Need to add gradient effect for borders. borders are triangle shaped here is the jsfiddle code .progress-indicator-wrapper { margin: 0 10px; font-size: 16px; color: #2f2f2f; background-image: linear-gradient(to bottom, #e7e7e7, #d8d8d8); } .progress-indicator { display: table; width: 100%; text-align: center; line-height: 20px; } .progress-indicator > div { display: table-cell; margin-top: 0; padding: 20px; position: relative; } .progress-indicator > div.progress-active::before { content: " "; position: absolute; left: 0; top: 0; border-top: 30px solid transparent; border-bottom: 30px solid

CSS gradients in IE7 & IE8 is causing text to become aliased

帅比萌擦擦* 提交于 2019-12-03 02:36:31
I'm attempting to use a CSS gradient in a div containing some text. With Gecko and Webkit, the text displays fine. In IE7 & IE8 the text appears aliased (jaggy). I came across this blog stating: "we decided to disable ClearType on elements that use any DXTransform". IE Blog: http://blogs.msdn.com/ie/archive/2006/08/31/730887.aspx That was back in 2006; 3.5 years later, I assume this bug would be fixed, but it's not. Is there a way to do this in IE8 without resorting to stuffing a repeating background image in the div? Here's an example of what I mean. <style> div { height: 50px; background:

Procedural generation of a constrained landscape

ぐ巨炮叔叔 提交于 2019-12-02 21:23:43
I'd like to implement a procedural generation of a terrain. After a thorough research I came up with a conclusion that it should be implemented with one of the gradient (coherent) noise generation algorithms, for instance Perlin Noise algorithm. However, I don't want the generation to be completely random. I'd like to apply some constraints (like where should be a mountain range, or where should be a lowland etc.). Question: For example I have a curve which represents some landscape element. The curve is an array of points. How can I improve the Perlin Noise algorithm, so that along this curve

ggplot2 : Add a gradient colored square according to values

一曲冷凌霜 提交于 2019-12-02 21:04:36
I have a tricky question regarding to what i'm trying to do. I have a plot with two lines (the mean of two conditions) on it. I want to add on the same plot a square reflecting the t-values (and colored according to these values in a gradient way). How could i add this square? Well since i don't know if i'm clear, here is a figure of what i try to achieve. Thank you for any help! Try this for ggplot2 way: x <- seq(-10, 10, 0.1) df <- data.frame(x, y1 = pnorm(x), y2 = pnorm(x) * 2) df$t <- df$y2 - df$y1 dfm <- melt(df, id = "x") ggplot(NULL, aes(x, value)) + geom_line(aes(colour = variable),

remove gradient of a image without a comparison image

核能气质少年 提交于 2019-12-02 20:56:27
currently i am having much difficulty thinking of a good method of removing the gradient from a image i received. The image is a picture taken by a microscope camera that has a light glare in the middle. The image has a pattern that goes throughout the image. However i am supposed to remove the light glare on the image created by the camera light. Unfortunately due to the nature of the camera it is not possible to take a picture on black background with the light to find the gradient distribution. Nor do i have a comparison image that is without the gradient. (note- the location of the light

White to transparent gradient with background image

不问归期 提交于 2019-12-02 18:59:15
I need to apply a white to transparent gradient which covers about a 1/4 of the top of the page and a background image visible for the rest of the page. Im looking to achieve a seamless blend from a gradient to a textured image and to do this in CSS3. MikeM I recommend Ultimate CSS Gradient Generator - ColorZilla.com It's a well designed tool and there's a white to transparent preset. The CSS code that it generates for a white to transparent gradient is this: background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6-15 */ background: -webkit-linear

How to make a double gradient with XML (iphone like)

左心房为你撑大大i 提交于 2019-12-02 16:49:54
How can I make this kind of drawable gradient with XML? I can do a simple gradient from color A to color B but i don't know how to combine two gradients in the same drawable. I finally found a solution with a layer-list which is good enough for me : <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- First part is a gradient --> <item android:left="0dp" android:right="0dp"> <shape android:shape="rectangle"> <gradient android:angle="-90" android:startColor="#9dcbf6" android:endColor="#177ee6" /> </shape> </item> <!-- Second part is

IE 8. Gradient background+image

给你一囗甜甜゛ 提交于 2019-12-02 16:29:50
问题 How can I make IE8 show a gradient background + image. This is possible in other browsers, but in IE it doesn't work. In other browsers: /* Opera */ background-image: url(gxt/images/my/eye.png) , -o-linear-gradient(top, #FFFFFF 0%, #EFCA11 100%); /* Webkit (Safari/Chrome 10) */ background-image:url(gxt/images/my/eye.png) , -webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #EFCA11)); 回答1: I found the answer to my question: filter: progid:DXImageTransform

Creating an animated gradient background similar to the Solar Weather Application in xCode

隐身守侯 提交于 2019-12-02 16:00:21
Even though I have asked this question before, I would like to reach out again to clarify what I would like to accomplish with your help. I was wondering how you would create a background of and iOS application in xCode similar to the background of the Solar weather app (screenshots provided) that changes slightly over time (in a cycle). As you can see the gradient is very smooth and obviously contains more than two main points. Any help with example or snippets of code would be greatly appreciated. Thanks Again, Ben. sergio What I need is: adding a CAGradientLayer to your view controller (or