Mike`s Gradiator
-
Greetings! Does anyone know how an XML (an example is given below) file created in the Mike Hankey`s GRADIATOR program would be written in C# itself? Specifically I mean the full definition of brush. GraphicsPath g = new GraphicsPath(); PathGradientBrush brush = new PathGradientBrush(g); . . . Thanks in advance, Aleksandar p.s. https://www.codeproject.com/Articles/20018/Gradients-made-easy example:
28316747 200,201,384,384 Palatino Linotype 10 Elliptical True pathGradient Color \[A=255, R=255, G=255, B=255\] Color \[Black\] Color \[A=255, R=180, G=180, B=180\] 90 {X=0.5104167, Y=0.5104167} True False Color \[A=255,R=0,G=27,B=82\] 0.507451 0.6080391 0,1 0.2,0.8 False False False {X=0.8039216, Y=0.8015845}
-
Greetings! Does anyone know how an XML (an example is given below) file created in the Mike Hankey`s GRADIATOR program would be written in C# itself? Specifically I mean the full definition of brush. GraphicsPath g = new GraphicsPath(); PathGradientBrush brush = new PathGradientBrush(g); . . . Thanks in advance, Aleksandar p.s. https://www.codeproject.com/Articles/20018/Gradients-made-easy example:
28316747 200,201,384,384 Palatino Linotype 10 Elliptical True pathGradient Color \[A=255, R=255, G=255, B=255\] Color \[Black\] Color \[A=255, R=180, G=180, B=180\] 90 {X=0.5104167, Y=0.5104167} True False Color \[A=255,R=0,G=27,B=82\] 0.507451 0.6080391 0,1 0.2,0.8 False False False {X=0.8039216, Y=0.8015845}
If you have a question about the code in an article, post it in the forum at the bottom of that article. That way, the author will be notified and will have a chance to respond to your question. Mike is still quite active here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
If you have a question about the code in an article, post it in the forum at the bottom of that article. That way, the author will be notified and will have a chance to respond to your question. Mike is still quite active here.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Thanks with an apology, Aleksandar
-
Greetings! Does anyone know how an XML (an example is given below) file created in the Mike Hankey`s GRADIATOR program would be written in C# itself? Specifically I mean the full definition of brush. GraphicsPath g = new GraphicsPath(); PathGradientBrush brush = new PathGradientBrush(g); . . . Thanks in advance, Aleksandar p.s. https://www.codeproject.com/Articles/20018/Gradients-made-easy example:
28316747 200,201,384,384 Palatino Linotype 10 Elliptical True pathGradient Color \[A=255, R=255, G=255, B=255\] Color \[Black\] Color \[A=255, R=180, G=180, B=180\] 90 {X=0.5104167, Y=0.5104167} True False Color \[A=255,R=0,G=27,B=82\] 0.507451 0.6080391 0,1 0.2,0.8 False False False {X=0.8039216, Y=0.8015845}
-
UWP and WPF employ gradient brushes (C#, XAML) that reflect what you've shown in XML.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
Thanks Garry! Although I don't quite understand (because I am an absolute c# beginner) the complete answer. Does this apply if the WPF App (.NET Framework) is used? What if you use the Windows Form App (.NET Framework)? I tried to add a couple of lines but it doesn't go further .. GraphicsPath gp = new GraphicsPath(); gp.AddEllipse(0,0,96,96); PathGradientBrush ringKnob = new PathGradientBrush(gp); ringKnob.CenterPoint = new PointF(49.0f, 49.0f); ringKnob.CenterColor = Color.FromArgb(255, 180, 180, 180); ringKnob.SurroundColors = new Color[]{ Color.FromArgb(255, 0, 27, 82) }; Blend blnd = new Blend(); blnd.Positions = new float[] { 0.0f, 1.0f }; blnd.Factors = new float[] { 0.2f, 0.8f }; Can XML be interpreted in this way?
-
Thanks Garry! Although I don't quite understand (because I am an absolute c# beginner) the complete answer. Does this apply if the WPF App (.NET Framework) is used? What if you use the Windows Form App (.NET Framework)? I tried to add a couple of lines but it doesn't go further .. GraphicsPath gp = new GraphicsPath(); gp.AddEllipse(0,0,96,96); PathGradientBrush ringKnob = new PathGradientBrush(gp); ringKnob.CenterPoint = new PointF(49.0f, 49.0f); ringKnob.CenterColor = Color.FromArgb(255, 180, 180, 180); ringKnob.SurroundColors = new Color[]{ Color.FromArgb(255, 0, 27, 82) }; Blend blnd = new Blend(); blnd.Positions = new float[] { 0.0f, 1.0f }; blnd.Factors = new float[] { 0.2f, 0.8f }; Can XML be interpreted in this way?
I found another solution, the topic locked