Esempio n. 1
0
        /**<summary>Replaces the coin textures in the dust texture.</summary>*/
        private static void ReplaceDust()
        {
            Image dustBmp = XnbExtractor.ExtractBitmap(Path.Combine(ImageDir, "Dust.xnb"));

            Bitmap gBmp = new Bitmap(dustBmp);

            using (Graphics g = Graphics.FromImage(gBmp)) {
                g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
                Point point   = new Point(440, 60);
                int   spacing = 10;
                g.DrawImage(GetImage(ImageTypes.Dust, Copper), point);          point.X += spacing;
                g.DrawImage(GetImage(ImageTypes.Dust, Silver), point);          point.X += spacing;
                g.DrawImage(GetImage(ImageTypes.Dust, Gold), point);            point.X += spacing;
                g.DrawImage(GetImage(ImageTypes.Dust, Platinum), point);        point.X += spacing;
            }
            PngConverter.Convert(gBmp, Path.Combine(ImageDir, "Dust.xnb"));
        }
Esempio n. 2
0
 /**<summary>Replaces an image content file.</summary>*/
 private static void ReplaceImage(ImageTypes type, RupeeColors color, string outputFile)
 {
     PngConverter.Convert(GetImage(type, color), Path.Combine(ImageDir, outputFile));
 }
Esempio n. 3
0
        //=========== HELPERS ============
        #region Helpers

        /**<summary>Replaces an image content file.</summary>*/
        private static void ReplaceImage(string name, string outputFile)
        {
            PngConverter.Convert(GetImage(name), Path.Combine(ImageDir, outputFile));
        }