OSDN Git Service

AppliStation,バージョンを1.1.0.*に変更。ソースファイルへのコメントの加筆
[applistation/AppliStation.git] / AppliStation / AppliStation.Util / GUIUtils.cs
index 7e235d6..ce69965 100644 (file)
@@ -57,11 +57,11 @@ namespace AppliStation.Util
                        const float b = 0.114478f;\r
                        \r
                        ColorMatrix cm = new ColorMatrix(new float[][]{\r
-                               new float[]{r, r, r, 0, 0},\r
-                               new float[]{g, g, g, 0, 0},\r
-                               new float[]{b, b, b, 0, 0},\r
+                               new float[]{r, r, r,     0, 0},\r
+                               new float[]{g, g, g,     0, 0},\r
+                               new float[]{b, b, b,     0, 0},\r
                                new float[]{0, 0, 0, alpha, 0},\r
-                               new float[]{0, 0, 0, 0, 1},\r
+                               new float[]{0, 0, 0,     0, 1},\r
                         });\r
                        ImageAttributes ia = new ImageAttributes();\r
                        ia.SetColorMatrix(cm);\r
@@ -69,6 +69,13 @@ namespace AppliStation.Util
                        return ia;\r
                }\r
                \r
+               /// <summary>\r
+               /// 画像を指定領域の真中に描く\r
+               /// </summary>\r
+               /// <param name="g">描画対象のグラフィックス</param>\r
+               /// <param name="img">画像</param>\r
+               /// <param name="b">指定領域</param>\r
+               /// <param name="ia">ImageAttributes。nullでもかまわない</param>\r
                public static void Graphics_DrawCenterImage(Graphics g, Image img, Rectangle b, ImageAttributes ia)\r
                {\r
                        int x = b.Left + (b.Width  - img.Width ) / 2;\r