Skip to content

Commit

Permalink
Removed drawing error
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-St committed Jun 21, 2018
1 parent 3e74a71 commit 42d79e1
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants
defaultGridSize
" rows @ cols "
^ 30 @ 15
^ 12 @ 6
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ drawCellsOn: aCanvas

self rows do: [ :row |
row cells do: [ :cell |
cell drawOn: aCanvas.]]
cell drawOn: aCanvas.
" Draw Borders"
aCanvas fillRectangle: (Rectangle origin: cell bottomLeft - (0@1) corner: cell bottomRight) color: cell borderColor.
aCanvas fillRectangle: (Rectangle origin: cell topRight - (1@0) corner: cell bottomRight) color: cell borderColor.]]
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ drawLabelsOn: aCanvas
self rows do: [ :row |
row drawOn: aCanvas.
" Border "
aCanvas fillRectangle: (Rectangle origin: row position corner: row topRight + 1) color: Color black.].
aCanvas fillRectangle: (Rectangle origin: row position - (0@1)corner: row topRight) color: Color black.].

self columns do: [ :column |
column drawOn: aCanvas.
" Borders "
aCanvas fillRectangle: (Rectangle origin: column position corner: column bottomLeft + 1 ) color: Color black]
aCanvas fillRectangle: (Rectangle origin: column position - (1@0) corner: column bottomLeft ) color: Color black]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ drawing
drawOn: aCanvas

aCanvas flush.
self
self
drawCellsOn: aCanvas;
drawLabelsOn: aCanvas;
drawOutlineOn: aCanvas
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
drawing
drawOutlineOn: aCanvas

"Mark all Label"
aCanvas fillRectangle: (Rectangle origin: self position corner: self position + self defaultSize) color: Color gray.
"Borders"
aCanvas fillRectangle: (Rectangle origin: self position corner: self topRight + 1) color: Color black .
aCanvas fillRectangle: (Rectangle origin: self position corner: self bottomLeft + 1) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self topRight corner: self bottomRight + 1) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self bottomLeft corner: self bottomRight + 1) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self position + self defaultSize corner: (self right - 20 @ self position y + self defaultSize y) + 1) color: Color black. "No idea where - 20 is coming from"
aCanvas fillRectangle: (Rectangle origin: self position + self defaultSize corner: (self position x + self defaultSize x @ self bottom) +1 ) color: Color black.

aCanvas fillRectangle: (Rectangle origin: self position corner: self topRight + (0@1)) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self position corner: self bottomLeft + (1@0)) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self topRight - (1@0) corner: self bottomRight) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self bottomLeft - (0@1) corner: self bottomRight) color: Color black.
aCanvas fillRectangle: (Rectangle origin: self position + (0@self defaultSize y) corner: (self right - 20 @ self position y + self defaultSize y) + (0@1)) color: Color black. "No idea where - 20 is coming from"
aCanvas fillRectangle: (Rectangle origin: self position + (self defaultSize x@0) corner: (self position x + self defaultSize x @ self bottom) +(1@0)) color: Color black.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"clickTime:" : "AS 6/21/2018 16:31",
"columnLabelAt:" : "AS 6/20/2018 14:32",
"columns" : "AS 5/3/2018 17:02",
"defaultGridSize" : "AS 6/21/2018 22:26",
"defaultGridSize" : "AS 6/22/2018 01:53",
"defaultSize" : "AS 6/20/2018 14:23",
"doubleClickTime" : "AS 6/21/2018 16:27",
"dragging" : "AS 6/17/2018 13:23",
"dragging:" : "AS 6/17/2018 13:19",
"drawCellsOn:" : "AS 6/21/2018 08:26",
"drawLabelsOn:" : "AS 6/21/2018 00:04",
"drawOn:" : "AS 6/21/2018 08:51",
"drawOutlineOn:" : "AS 6/21/2018 08:15",
"drawCellsOn:" : "AS 6/22/2018 01:46",
"drawLabelsOn:" : "AS 6/22/2018 01:49",
"drawOn:" : "AS 6/22/2018 01:51",
"drawOutlineOn:" : "AS 6/22/2018 01:53",
"editCell:event:" : "AS 6/21/2018 13:30",
"editor" : "AS 5/16/2018 17:03",
"editor:" : "AS 5/16/2018 17:03",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ drawOn: aCanvas
roundRectShapeBounds: self bounds
radius: (Rectangle left: 0 right: 0 top: 0 bottom: 0)
borderWidth: (Rectangle left: 1 right: 1 top: 1 bottom: 1))."
" Draw Borders"
aCanvas fillRectangle: (Rectangle origin: self position corner: self topRight + 1) color: self borderColor.
aCanvas fillRectangle: (Rectangle origin: self position corner: self bottomLeft + 1) color: self borderColor.
aCanvas fillRectangle: (Rectangle origin: self topRight corner: self bottomRight + 1) color: self borderColor.
aCanvas fillRectangle: (Rectangle origin: self bottomLeft corner: self bottomRight + 1) color: self borderColor.

transform := MatrixTransform2x3 withOffset: self layoutBounds origin + aCanvas origin.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"defaultBackgroundColor" : "AS 6/20/2018 21:35",
"defaultBounds" : "AS 6/20/2018 11:16",
"defaultColor" : "AS 6/20/2018 21:30",
"drawOn:" : "AS 6/21/2018 08:51",
"drawOn:" : "AS 6/22/2018 01:38",
"extent" : "AS 6/20/2018 11:07",
"extent:" : "AS 6/20/2018 23:29",
"height" : "AS 6/20/2018 11:14",
Expand Down

0 comments on commit 42d79e1

Please sign in to comment.