Multicolor LinearGradientBrush?
Oct 13, 2009
know that the LinearGradientBrush in system.drawing supports two color gradient,but can I put 3 or 4 color gradient in a single brush?can I do that:dim b as newlineargradientbrush(newtangle(0,0,100,100),color.black,color.white)b.InterpolationColors.Colors = New Color() {Color.AliceBlue, Color.AntiqueWhite, Color.Aqua, Color.Aquamarine, Color.Azure}
View 1 Replies
Mar 22, 2011
I would like to make a line of text in my richtextbox multicolor. I have tried various implementations provided on the web and read up on SelectedText and other topics but can't seem to get it to work the way I would like to.Here is what I have so far
RichTextBox1.Text = "This is black "
RichTextBox1.SelectionFont = New Font("Microsoft Sans Serif", 8.25, FontStyle.Bold)
RichTextBox1.SelectionColor = Color.Green
RichTextBox1.SelectedText = "[BOLD GREEN]"
RichTextBox1.Text = RichTextBox1.Text + " black again"
The colors I want are stated as the text. What happens is: the entire line turns green, "[BOLD GREEN]" appears at the beginning of the textbox instead of inline. I want it to read like this: "this is black" as black. "[BOLD GREEN]" as green and "black again" as black.
View 1 Replies
Jun 1, 2012
I want to paint the background of a form with gradient using the LinearGradientBrush; but I have troubles using degrees.Basically, I want using linear gradient in diagonal.
View 1 Replies
Nov 20, 2011
Anyone played with LinearGradientBrush? I'm using it to plot some chunky text with a gradient fill on a picturebox . Say I want the text to be full yellow at the top (255,255,0) and full red at the bottom (255,0,0). What I get is a light orange shade at the top of the letters and a dark orange at the bottom. I never get the full range of shades. I would prefer to have say 10% at the top of each letter plotted with the full starting colour, then the gradient, followed by the bottom 10% plotted with the ending colour. I hope that makes sense. Obviously I'm using MeasureString to get the height of the text and I've played with making that value larger and smaller but it didn't seem to help.I have seen references to SetBlend Triangular Shape and WrapMode which look interesting, but no examples of how these would produce the effect I'm looking for.
View 7 Replies
Feb 18, 2010
Can anyone explain why the effect of a LinearGradientBrush does not always seem symmetrical?To see what I mean with the following code where point1 is halfway down the left side of the form,point2 is halfway down the right hand side.Using the colors Blue and Green the transition appears mainly nearer 3 quarters of the way across the FORM for the BLUE changing to GREEN.
View 9 Replies