Given 2 rgb colors and a rectangular area, I'd like to generate a basic linear gradient between the colors. I've done a quick search and the only thing I've been able to find is this blog entry, but the example code seems to be missing, or at least it was as of this posting. Anything helps, algorithms, code examples, whatever. This will ...
Ok, narrow question of the day. I'm using GflAx (from xnview) to create some graphic tiles. I would like to put some gradients in as well though.
Is there a way I can do this within this product?
Thanks.
Edit:There is also an SDK which is part of this product but I can't find that info there.
...
I need to put an alpha blended gradient border around an image. My problem is in blending the corners so they are smooth where the horizontal and vertical gradients meet. I believe there is a standard algorithm that solves this problem. I think I even encountered it in school many years ago. But I have been unsuccessful in finding any...
Hi,
Is there a way to do gradients in css/html/javscript only that will work across all the major browsers? (ie 5+, firefox, opera, safari)?
Edit: I would like to do this for backgrounds (header, main panel, side panels). Also, would like to have vertical line gradients as well.
Edit: after reading the responses, let's open this up to...
I'm trying to create a color-picker which must dynamically generate its images and figured it would be a whole lot easier to generate SVG than a raster image. Unfortunately, I can't figure out how to represent the big, two-dimensional gradient which will form the centerpiece of the picker.
For example, if the currently selected axes ar...
Is it possible to create a gradient fill in a PDF using ReportLab (python)?
...
If you use this code in Silverlight and WPF you get slightly different results?
<Button Name="SomeButton" Margin="10,15,180,12" Width="200" Height="50"
VerticalAlignment="Top" Background="Black" Foreground="White">
</Button>
In Silverlight you do not get a solid black Button. You get a vertical white-to-black grad...
Hi, I was trying to use Raphale JS graphics library. I would like to use the attribute gradient which should accept an object. Documentation says to refer to SVG specs. I found the gradient object in SVG, for instance
<linearGradient id="myFillGrad" x1="0%" y1="100%" x2="100%" y2="0%">
<stop offset="5%" stop-color="red" />
<stop offset...
Is it possible to draw a line using a graduated colour?
I want to be able to draw a stright or a curved line (if possible) where one end of the line is Blue and the other Red.
Further There might be a beed to have more than one gradient per-line e.g the colour going from blue -> green -> red. Im thinking that this might just consist ...
I use my own library for a lot of stuff, and recently I decided to add gradient functionality, but I've encountered a problem that I seem to remember having a while ago also, and this is the matter of my gradient being slightly off near the end. First, the code in question:
gradient = function(l, g)
{
var r = [], s = [], f = g.length -...
Hello all. I'm having an odd issue with CALayer drawing for the iPhone. I have a root layer which adds a bunch of sublayers representing "bubbles". The end result is supposed to look something like this:
The problem is that I can't seem to get the layer to anti-alias (notice the jaggies on the bubbles). My code overwriting drawInC...
I started to play with WPF and wanted to draw color wheel on a form.
At first I tryed to use LinearGradientBrush on ArcSegment like this:
<Path StrokeThickness="35" Height="150" Width="150">
<Path.Stroke>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="Red" Offset="0.15" />
...
I'm experimenting with drawing on the iPhone by manually creating parts of the UI for my application (In this case a graph). Essentially, I want to draw a rectangle with rounded corners, a drop-shadow, and a semi-transparent gradient as the fill of the rectangle. Here is a screen shot of my photoshop mockup:
I've gotten has far as crea...
Hi, i have a problem with my code.
foreach (DataRow dr in dt_pattern.Rows)
{
part = dr["patternString"].ToString();
if (part != vpart)
{
System.Console.WriteLine(part);
System.Console.WriteLine("Geben Sie bitte für den Abschnitt die AT ein: ");
temp = System.Console.ReadLine();
AT = ...
Hi,
the fill property in SVG accepts an url to point to a gradient/pattern element, an instance of a so-called 'paint server'.
The Question: Is it possible in any browser (that is, not IE, of course), to use a gradient defined in an external SVG file? Like, in rect.svg,
<rect fill="url(grad.svg#my_grad)" />
and the corresponding <li...
If I have four colours (A, B, C & D) on four corners of a square and I want to fill that square with a gradient that blends nicely between the four colours how would I calculate the colour of the point E?
The closer E is to any of the other points, the strong that colour should affect the result.
Any idea how to do that? Speed and sim...
In Silverlight (version 3 preview), I want to create a Line with different solid colors, so no gradients between colors.
Basically I want to do the following:
<Line X1="0" X2="500" StrokeThickness="10">
<Line.Stroke>
<LinearGradientBrush>
<GradientStop Color="Blue" Offset="0.5" />
<GradientStop Color="Red" Offset="1"/>
</LinearGr...
Here's the current code I am using.
<? header("Content-type: image/png");
// example: <img src="gradient.php?height=600&width=100&start=00FF00&end=ff0000" />
$height=100;
$width=1;
$start='000000';
$end='FFFFFF';
extract($_REQUEST); // overwrite using vars from url
$start_r = hexdec(substr($start,0,2));
$start_g = hexdec(substr($start,2...
I am trying to create an arc (variable width, variable number of degrees - potentially an entire circle) that gradually goes from, say, red on one end to green on the other. I haven't figured out how to specify a gradient on an arc to accomplish this.
For example, if you could imagine creating a round temperature gauge where the guage ...
I need to replicate a circular (or angle) gradient from a Photoshop comp in WPF; so far I can only find linear and radial. Does anyone know if such a thing exists, or and easy way to get get a circular gradient in WPF?
Note: I'm not asking about a radial gradient. A circular gradient is like taking a rectangle, applying a gradient and t...