Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Mike`s Gradiator

Mike`s Gradiator

Scheduled Pinned Locked Moved C#
csharpcomxmltutorialquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alejandro011
    wrote on last edited by
    #1

    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}
    
    Richard DeemingR L 2 Replies Last reply
    0
    • A Alejandro011

      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}
      
      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      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

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      A 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        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

        A Offline
        A Offline
        Alejandro011
        wrote on last edited by
        #3

        Thanks with an apology, Aleksandar

        1 Reply Last reply
        0
        • A Alejandro011

          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}
          
          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • L Lost User

            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

            A Offline
            A Offline
            Alejandro011
            wrote on last edited by
            #5

            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?

            A 1 Reply Last reply
            0
            • A Alejandro011

              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?

              A Offline
              A Offline
              Alejandro011
              wrote on last edited by
              #6

              I found another solution, the topic locked

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups