linear-gradients

BorderColor not picking the linearGradient color on android

不打扰是莪最后的温柔 提交于 2019-12-01 13:30:36
Im trying to create a circle with an image inside it that its border is colourful that's why I used LinearGradient. I was using this guide: https://codeburst.io/linear-gradient-for-border-color-in-react-native-5bcab3eea1c9 the problem that in iOS its working fine as you can see in this image: https://imgur.com/a/Tz0uEcC but on android the when I use borderWidth and choosing borderColor of transparent the borderColor looks like shadow and not picking the LinearGradient color from some reason... here is the android: https://imgur.com/a/qG1LJBt what am I doing wrong? <LinearGradient colors={['

colourful polylines in android maps api v2

久未见 提交于 2019-12-01 08:23:31
I want to draw polyline in android maps api version 2. I want it to have many colors, preferably with gradients. It seems to me though, that polylines are allowed to have only single color. How can I do that? I already have api-v1 overlay drawing what I like, so presumably I can reuse some code public class RouteOverlayGoogle extends Overlay { public void draw(Canvas canvas, MapView mapView, boolean shadow) { //(...) draws line with color representing speed } Guillaume Noël-Martel I know it's been a pretty long time since this has been asked, but there are still no gradient polylines (as of

colourful polylines in android maps api v2

元气小坏坏 提交于 2019-12-01 06:57:34
问题 I want to draw polyline in android maps api version 2. I want it to have many colors, preferably with gradients. It seems to me though, that polylines are allowed to have only single color. How can I do that? I already have api-v1 overlay drawing what I like, so presumably I can reuse some code public class RouteOverlayGoogle extends Overlay { public void draw(Canvas canvas, MapView mapView, boolean shadow) { //(...) draws line with color representing speed } 回答1: I know it's been a pretty

How to draw a linear gradient arc with Qt QPainter?

我们两清 提交于 2019-12-01 04:02:22
I'm trying to develop a custom QProgressBar that will look like the following image : I created a class that extends QProgressBar and implemented the paintEvent() : void CircularProgressBar::paintEvent(QPaintEvent*) { int progress = this->value(); int progressInDegrees = (double)(progress*360)/100; int barWidth = 20; QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, barWidth, Qt::SolidLine,Qt::RoundCap)); painter.drawArc(barWidth/2, barWidth/2, this->width() - barWidth, this->height() - barWidth, 90*16, progressInDegrees*-16);} This

SVG Linear gradient doesn't work in Safari

孤街醉人 提交于 2019-12-01 03:09:51
I've got an SVG object that contains a linear gradient embedded directly in a document. It works fine in Chrome and Firefox, but in Safari nothing is rendered. If I create the SVG as a file and embed it using the Object tag, it works fine in Safari. Other shapes and fills work, it's just linear gradient that doesn't work. I guess I could use the object, but I'd prefer to embed the SVG directly. I've create a demo here (works in Chrome, not Safari): http://jsfiddle.net/sjKbN/ I came across this answer which suggests setting the content type to application/xhtml+xml , but this in itself seems to

How to draw a linear gradient arc with Qt QPainter?

心不动则不痛 提交于 2019-12-01 00:47:59
问题 I'm trying to develop a custom QProgressBar that will look like the following image : I created a class that extends QProgressBar and implemented the paintEvent() : void CircularProgressBar::paintEvent(QPaintEvent*) { int progress = this->value(); int progressInDegrees = (double)(progress*360)/100; int barWidth = 20; QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen(Qt::black, barWidth, Qt::SolidLine,Qt::RoundCap)); painter.drawArc(barWidth/2,

Creating a CSS linear gradient based on two points relative to a rectangle

本小妞迷上赌 提交于 2019-12-01 00:08:33
I am trying to recreate the gradient tool in Sketch. The tool in Sketch is using two points with different colors to define a gradient: I want the output to be in the form of a CSS linear gradient value. The way a CSS linear gradient is constructed is an angle and x number of color stops with a color and a percentage defined: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient So I want to convert two points relative to the rectangle in which the gradient should be rendered to the CSS format (two parameters with the correct percentage). Any ideas on how to approach this problem?

Rounded arrow shape with gradient fill

不羁的心 提交于 2019-11-30 23:50:14
For my online game UI, I decided to make Hill Climb Racing (Android Game) 's buttons. This is is what I have presently : body { color: white; font-family: Impact, fantasy; font-size: 40px; line-height: 100px; text-align: center; } .rect { height: 100px; width: 280px; background: #545D60; border-radius: 20px 50px 50px 20px; position: relative; } .rect:before { background: #545D60; content: ""; position: absolute; top: 6px; left: 195px; height: 0px; width: 0px; border-radius: 30px 10px; border: 44px solid #545D60; transform: rotate(45deg); } <div class="rect">NEXT</div> The problem lies with

How to use SVG gradients to display varying colors relative to the size of the colored region

允我心安 提交于 2019-11-30 21:24:54
I'm using SVG and D3 to create bar graphs and have a question concerning how to color them. I've searched many questions on this site and others and haven't yet found anyone with the same issue. I would like each bar to start at the bottom with one color, (yellow, e.g.) and, as the bar gets taller, progressively mix in more of the second color, (red, e.g.), so that the bars at their maximum potential height would be only the second color. In this example, the tops of the bars that are half their potential height would be orange. I was able to write a function to produce, for a bar of any given

Use linear gradient in CSS to split div in 2 colors but not in equal halves

若如初见. 提交于 2019-11-30 18:48:13
问题 I am trying to achieve a typical style in a div by splitting it into 2 halves and then creating a diagonal in between so it looks good. Screenshot below: <div class="contact hidden-xs"> <div class="diagonal"></div> </div> .contact{ width: 100%; height: 500px; background: linear-gradient(to right, #f87f73 50%, #292423 50%) } .diagonal{ margin-left: 50%; width: 0px; border-width: 500px 200px 0px 0px; border-style: solid; border-color: #f87f73 transparent transparent transparent; } This is how I