OSDN Git Service

draw operable rects
[sharp4k/CUTEn.git] / ECC_evenodd / src / jp / ac / titech / sharp4k / cuten / sampletask / MatrixView.java
index e831f9f..77696f0 100644 (file)
@@ -49,6 +49,19 @@ public class MatrixView extends View {
 
        @Override
        protected void onDraw(Canvas canvas) {
+               // draw operable Rects
+               Paint opRect = new Paint();
+               opRect.setARGB(50, 240, 248, 255);
+               for (int i = 0; i < opcol.length; i++) {
+                       if (i == opcol.length - 1) {
+                               canvas.drawRect(width * opcol[i], height, width
+                                               * (opcol[i] + 1), height * (row + 1), opRect);
+                       } else {
+                               canvas.drawRect(width * opcol[i], height, width
+                                               * (opcol[i] + 1), height * row, opRect);
+                       }
+               }
+
                // draw matrix line
                Paint line = new Paint();
                line.setColor(Color.GRAY);