[Picross-commit] SF.net SVN: picross: [24] trunk/src/picross/grid/GridUI.java
Status: Pre-Alpha
Brought to you by:
yvan_norsa
|
From: <yva...@us...> - 2007-06-07 19:37:17
|
Revision: 24
http://picross.svn.sourceforge.net/picross/?rev=24&view=rev
Author: yvan_norsa
Date: 2007-06-07 12:37:17 -0700 (Thu, 07 Jun 2007)
Log Message:
-----------
5x5 boxes groups
Modified Paths:
--------------
trunk/src/picross/grid/GridUI.java
Modified: trunk/src/picross/grid/GridUI.java
===================================================================
--- trunk/src/picross/grid/GridUI.java 2007-06-07 19:05:53 UTC (rev 23)
+++ trunk/src/picross/grid/GridUI.java 2007-06-07 19:37:17 UTC (rev 24)
@@ -338,6 +338,48 @@
}
}
}
+
+ g.setColor(Color.RED);
+
+ int currentY = this.topBoundary;
+ int boxWidth = 5 * GridUI.BOX_WIDTH;
+ int boxHeight = 5 * GridUI.BOX_HEIGHT;
+
+ int i = 0;
+
+ while (i < this.height) {
+ int currentX = this.leftBoundary;
+ int j = 0;
+
+ while (j < this.width) {
+ if ((i + 5) <= this.height) {
+ if ((j + 5 <= this.width)) {
+ g.drawRect(currentX, currentY,
+ boxWidth, boxHeight);
+ } else {
+ g.drawRect(currentX, currentY,
+ (this.width - j) * GridUI.BOX_WIDTH,
+ boxHeight);
+ }
+ } else {
+ if ((j + 5 <= this.width)) {
+ g.drawRect(currentX, currentY,
+ boxWidth,
+ (this.height - i) * GridUI.BOX_HEIGHT);
+ } else {
+ g.drawRect(currentX, currentY,
+ (this.width - j) * GridUI.BOX_WIDTH,
+ (this.height - i) * GridUI.BOX_HEIGHT);
+ }
+ }
+
+ currentX += boxWidth;
+ j += 5;
+ }
+
+ currentY += boxHeight;
+ i += 5;
+ }
}
/*** Methods ***/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|