radial-gradients

Radial CAGradientLayer not rendering properly at runtime

老子叫甜甜 提交于 2019-12-24 19:42:54
问题 I'm trying to create a radial CAGradientLayer in swift. Normal CAGradientLayers (with default type axial ) are no problem. They are rendering fine on the snapshot and on runtime in the simulator. When I take a snapshot of the UIView that I created (solely for the CAGradientLayer), it shows a beautiful radial CAGradientLayer. However, when I use this view and look at it at runtime in the simulator, it looks awful. I don't know what I'm doing wrong. This is the code for the CAGradientLayer:

what's meaning of the percentage for color stop in css3 radial gradient

余生颓废 提交于 2019-12-24 12:50:11
问题 This maybe a simple question, but I didn't find a clear explanation for this. I know in css3, the syntax for setting up a radial gradient is as following: radial-gradient(shape size at position, start-color, ..., last-color); If I set sth like this: radial-gradient(circle at 50% 50%, #f00 50%, transparent 50%); I thought the red circle will be positioned in the center, and the radius of the red circle would be 50%*containerWidth (or containerHeight). i.e. the circle will just touch the edge

HighCharts: How to combine custom colors with gradient

十年热恋 提交于 2019-12-24 02:13:15
问题 For some while now Im playing with coloring of my pie chart... And either I got my custom colors without gradient, or default colors with gradient... My colors are stored in php field, which I want to load like colors: <?echo $myColors;?> . Actual state of my code is like this (it shows default colors with gradient): colors: Highcharts.map(Highcharts.getOptions().colors, function(color) { return { radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 }, stops: [ [0, color], [1, Highcharts.Color(color)

Apply gradient to sphere object with JavaFX

泪湿孤枕 提交于 2019-12-23 17:00:50
问题 I'm working in JavaFX for a class, and I'm trying to apply a gradient to a sphere, but (obviously), I can't figure out how to do it. I'm stuck because I know that a sphere is an object, and so it needs to have a material, but (as far as colors go), a PhongMaterial only takes one color, and so it won't take a gradient because a gradient is a range of colors. So basically what I'm trying to is the following: Sphere sphere = new Sphere(50); RadialGradient rg = new RadialGradient(0, 0, 0, 0, 5,

Why is webkit radial gradient not working in Safari?

血红的双手。 提交于 2019-12-23 12:33:11
问题 This is working in Chrome but not in Safari: background: -webkit-radial-gradient(center, ellipse cover, #fdfdfd, #d3d3d3); How can I fix it for Safari? 回答1: Try using for Safari: background: -webkit-gradient( radial, <point>, <radius>, <point>, <radius>[, <stop>]* ) <color>; Examples and more explanation can be found here: http://www.the-art-of-web.com/css/radial-gradients/ 回答2: It doesn't even work correctly in Chrome, as it shows a circular gradient, not an elliptical one. It does work

Dotted text in css?

泪湿孤枕 提交于 2019-12-20 09:12:10
问题 Is it possible to make dotted text with css? I know that the obvious thing would be to use a dotted font, but If I only need to use dotted text sparingly, then having the user to download a whole font might be overdoing it. The idea that I had was to overlay the text with a pseudo element with a background pattern of small transparent circles with a white background. Some thing like this: <div class="dottedText">Some dotted text</div> FIDDLE CSS .dottedText:after { content: ''; position

Radial gradients of arcs in D3.js

↘锁芯ラ 提交于 2019-12-19 04:50:10
问题 I see from this example, how to make an arc in D3.js have a 1D gradient from one end of the arc to the other. I would also like to apply a radial gradient from the inner ring to the outer. Is this possible? 回答1: Yes, you can do this with a radialGradient. Example here. 来源: https://stackoverflow.com/questions/21663246/radial-gradients-of-arcs-in-d3-js

How to apply multiple css radial gradients to a single element

一个人想着一个人 提交于 2019-12-18 17:31:14
问题 I have the following style applied to my div element: background-image: -moz-radial-gradient(50% -10%, ellipse closest-corner, rgba(5, 5, 5, 0.7), rgba(0, 0, 0, 0) 100%); This has the desired effect (being an inner drop shadow only at the top of the div ). I would like to apply the same effect at the bottom of the div . The following line does it well, but it seems to override the first, so I can only get one or the other. background-image: -moz-radial-gradient(50% 110%, ellipse closest

CSS3 Gradients to reproduce an 'inner glow' effect from Illustrator with border-radius applied

北城余情 提交于 2019-12-18 12:15:21
问题 I am in the process of trying to get my head properly around CSS3 Gradients (specifically radial ones) and in doing so I think I've set myself a relatively tough challenge. In Adobe Illustrator I have created the following 'button' style. To create this image I created a rectangle with a background colour of rgb(63,64,63) or #3F403F , then 'stylized' it to have a 15px border radius. I then applied an 'inner glow' to it with a 25% opacity, 8px blur, white from the center. Finally, I applied a

How to implement oval GradientPaint?

不问归期 提交于 2019-12-17 19:53:20
问题 We know that there are a class named RadialGradientPaint in Java and we can use it to have a gradient painting for circle. But I want to have an oval (ellipse) GradientPaint . How to implement oval GradientPaint ? 回答1: Use an AffineTransform when drawing the RadialGradientPaint . This would require a scale instance of the transform. It might end up looking something like this: import java.awt.*; import java.awt.MultipleGradientPaint.CycleMethod; import java.awt.geom.*; import java.awt.event.*