gradient

Fade image to transparent like a gradient

我们两清 提交于 2019-11-26 15:52:46
问题 I would like to have an image (a background image) to fade to transparent so that content behind it can actually be seen (barely, thanks to transparency). I can achieve it obviously with a PNG image, but I need to ask to my graphic designer to change the image every time I want to change the start => stop transparency points (maybe I want more color or maybe I want less color and more transparency). Are there any chance I can achieve the same effect with CSS3? I tried applying a gradient to

How do I add a gradient to the text of a UILabel, but not the background?

泪湿孤枕 提交于 2019-11-26 15:51:11
hey, I want to be able to have a gradient fill on the text in a UILabel I know about CGGradient but i dont know how i would use it on a UILabel's text i found this on google but i cant manage to get it to work http://silverity.livejournal.com/26436.html (Skip to bottom for full class source code) Really useful answers by both Brad Larson and Bach. The second worked for me but it requires an image to be present in advance. I wanted something more dynamic so I combined both solutions into one: draw the desired gradient on a UIImage use the UIImage to set the color pattern The result works and in

JTable how to change BackGround Color

时光怂恿深爱的人放手 提交于 2019-11-26 15:30:11
I inspired by MeBigFatGuy interesting question , in this conection I have very specific question about Graphisc2D , how to change BackGround Color by depends if is JTables Row visible in the JViewPort , 1) if 1st. & last JTables Row will be visible in the JViewPort , then BackGround would be colored to the Color.red 2) if 1st. & last JTables Row will not be visible in the JViewPort , then BackGround would be colored to the Color.whatever from SSCCE import java.awt.*; import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import javax.swing.*; import javax.swing.RepaintManager;

How to plot a gradient color line in matplotlib?

大兔子大兔子 提交于 2019-11-26 15:12:06
To state it in a general form, I'm looking for a way to join several points with a gradient color line using matplotlib , and I'm not finding it anywhere. To be more specific, I'm plotting a 2D random walk with a one color line. But, as the points have a relevant sequence, I would like to look at the plot and see where the data has moved. A gradient colored line would do the trick. Or a line with gradually changing transparency. I'm just trying to improve the vizualization of my data. Check out this beautiful image produced by the ggplot2 package of R. I'm looking for the same in matplotlib.

Android LinearLayout Gradient Background

自作多情 提交于 2019-11-26 14:59:13
问题 I am having trouble applying a gradient background to a LinearLayout. This should be relatively simple from what I have read but it just doesn't seem to work. For reference sakes I am developing on 2.1-update1. header_bg.xml: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="90" android:startColor="#FFFF0000" android:endColor="#FF00FF00" android:type="linear"/> </shape> main_header.xml:

Gradient of n colors ranging from color 1 and color 2

自闭症网瘾萝莉.ら 提交于 2019-11-26 14:58:25
I often work with ggplot2 that makes gradients nice ( click here for an example ). I have a need to work in base and I think scales can be used there to create color gradients as well but I'm severely off the mark on how. The basic goal is generate a palette of n colors that ranges from x color to y color. The solution needs to work in base though. This was a starting point but there's no place to input an n. scale_colour_gradientn(colours=c("red", "blue")) I am well aware of: brewer.pal(8, "Spectral") from RColorBrewer . I'm looking more for the approach similar to how ggplot2 handles

Gradients in Internet Explorer 9

时间秒杀一切 提交于 2019-11-26 14:19:06
Does anyone know the vendor prefix for gradients within IE9 or are we still supposed to still be using their proprietry filters? What I've got for the other browsers is: background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6 */ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #444444),color-stop(1, #999999)); /* Saf4+, Chrome */ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999'); /* IE6,IE7 */ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999')"; /*

Swift: Gradient along a bezier path (using CALayers)

倾然丶 夕夏残阳落幕 提交于 2019-11-26 14:17:35
问题 I have a relatively straight forward implementation of a progress view set up with CALayer objects. The progress view itself is a subview of UIView. Here is the code that sets up the progress ring: self.progressRingLayer = CAShapeLayer() let innerRect = CGRectInset(bounds, CGFloat(self.lineWidth) / 2, CGFloat(self.lineWidth) / 2) let innerPath = UIBezierPath(ovalInRect: innerRect) self.progressRingLayer.path = innerPath.CGPath self.progressRingLayer.fillColor = UIColor.clearColor().CGColor

Matplotlib: How to colorize a large number of line segments as independent gradients, efficiently

我的梦境 提交于 2019-11-26 14:09:50
问题 Python. matplotlib : How to colorize a large number of line segments as independent gradients, efficiently? Already, read this and this and other stuff; none of them is our answer! We have a number of separate lines wish to plot each in gradient color. The solution mentioned in first link above, does not work if you have more than one string of line. In other words, changing the color cycle affects everything in the plot not the only line of interest. This is not of our interest at all. The

Using CSS, can you apply a gradient mask to fade to the background over text?

不羁岁月 提交于 2019-11-26 13:09:00
问题 I have a full screen fixed background image. I would like the text in my scrolling div to fade out at the top, presumably by applying a gradient mask to the background at only the top part of the div. I\'m interested in having the text look like it fades away as it the user scrolls down, but still having a large area of full opacity for actually reading the text. I know there are masking options in the webkit, but I can\'t find a way to fade through to the page\'s background over the