[Picross-commit] SF.net SVN: picross: [34] trunk/src/picross/grid/GridUI.java
Status: Pre-Alpha
Brought to you by:
yvan_norsa
From: <yva...@us...> - 2007-06-13 15:32:37
|
Revision: 34 http://picross.svn.sourceforge.net/picross/?rev=34&view=rev Author: yvan_norsa Date: 2007-06-13 08:32:37 -0700 (Wed, 13 Jun 2007) Log Message: ----------- fixed blocks and boundaries Modified Paths: -------------- trunk/src/picross/grid/GridUI.java Modified: trunk/src/picross/grid/GridUI.java =================================================================== --- trunk/src/picross/grid/GridUI.java 2007-06-13 15:04:38 UTC (rev 33) +++ trunk/src/picross/grid/GridUI.java 2007-06-13 15:32:37 UTC (rev 34) @@ -247,16 +247,19 @@ int hintBoxWidth = this.hintBoxIcon.getIconWidth(); int hintBoxHeight = this.hintBoxIcon.getIconHeight(); + this.leftHintsDecal = hintBoxWidth + GridUI.HINTS_SPACE; + this.topHintsDecal = hintBoxHeight + GridUI.HINTS_SPACE; + // Now computes the grid boundaries this.leftBoundary = GridUI.LEFT_HINTS - + (this.rowData[0].length * hintBoxWidth); + + (this.rowData[0].length * leftHintsDecal); this.rightBoundary = this.leftBoundary + (this.width * GridUI.BOX_WIDTH); this.topBoundary = GridUI.TOP_HINTS - + (this.colData[0].length * hintBoxHeight); + + (this.colData[0].length * topHintsDecal); this.bottomBoundary = this.topBoundary + (this.height * GridUI.BOX_HEIGHT); @@ -273,13 +276,10 @@ this.topHintsX = this.leftBoundary + (GridUI.BOX_WIDTH / 2) - (hintBoxWidth / 2); - this.topHintsDecal = hintBoxHeight + GridUI.HINTS_SPACE; this.leftHintsY = this.topBoundary + (GridUI.BOX_HEIGHT / 2) - (hintBoxHeight / 2); - this.leftHintsDecal = hintBoxWidth + GridUI.HINTS_SPACE; - this.centerHintHeight = (hintBoxHeight / 2) + (hintHeight / 2); this.centerLowHintWidth = @@ -399,7 +399,7 @@ int i = 1; int currentY = this.topBoundary + boxHeight; - while (i < this.height) { + while ((i + GridUI.BLOCK_HEIGHT) <= this.height) { this.blocksLines.add(new Line2D.Double(this.leftBoundary, currentY, this.rightBoundary, @@ -412,7 +412,7 @@ i = 1; int currentX = this.leftBoundary + boxWidth; - while (i < this.width) { + while ((i + GridUI.BLOCK_WIDTH) <= this.width) { this.blocksLines.add(new Line2D.Double(currentX, this.topBoundary, currentX, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |