Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 16036

Conversion XNA.Framework.Color - System.Drawing.Color and viceversa

$
0
0
I need to convert colors from Xna.framework.color to System.Drawing.color and viceversa.
So I tryed to code this 2 function(note that vs obmit the "Xna.framework."
Code:

Public Function DrawingToXNAColor(ByVal color As System.Drawing.Color) As Color
        Return New Color(color.R, color.G, color.B, color.A)
    End Function
    Public Function XNAtoDrawingColor(ByVal color As Microsoft.Xna.Framework.Color) As System.Drawing.Color
        Return New FromArgb(argb)
            ((color.R, color.G, color.B, color.A))
    End Function

The first work fine, but I can't make to work the second. Any advice?

Viewing all articles
Browse latest Browse all 16036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>