This may sound like a simple question with a definite answer, but I think it is worthy of further explanation. I wanted to make a chessboard shape with as few lines as possible, because it makes the shape more efficient and easy to work with. Some might consider grouping 64 squares together, but that would be a very heavy shape. A chessboard needs to appear to have 64 squares, but the following shape only has 9 rectangles … How is this possible?
It simply relies on the fact that the crossover of two filled geometry sections in a Visio shapes actually result in a non-filled area! The above shape has one square to provide the outer border, and then four rectangles horizontally, and four rectangles vertically.
The following image, create using Scroll to Capture Visio ShapeSheets with SnagIt, of the ShapeSheet shows how simple this is to create in Visio. Each of the Geometry sections below describe a rectangle using formulas. A rectangle needs to have a starting vertex, then three other vertices in order, and finally returns to the original starting vertex. Geometry 1 is the enclosing rectangle; Geometry sections 2,3,4, &5 are column 2, 4, 6 & 8; and Geometry sections 6,7,8 & 9 are rows 1,3,5 & 7.
I have used the default RelMoveTo and RelLineTo row types, because they expect a simple number to defined the relative position of the vertex in the X or Y direction with respect to the Width or the Height. Thus X=0.125 is equal to the Width / 8, and Y=0.5 is equal to the Height / 2.
Although I prefer to add sections and rows directly in the ShapeSheet, you can see the same effect by overlapping two filled rectangle shapes in Visio, and then using the Developer / Shape Design / Operations / Combine function. Notice how the resultant shape only has one colour fill, which is the fill of the first selected shape. This is because a traditional Visio shape can only have a single foreground colour. At first sight, you may think that there are five rectangles in the resultant shape, but the ShapeSheet shows that there are in fact only two!
Next I will be adding checkers or chess pieces onto the board….
Update: My good friend Chris Roth, aka VisGuy.com, has pointed out that a checkerboard can be created by a single snaking line! Excellent!
[…] added connection points to the dark squares of my chess/checker board created previously ( What’s the minimum number of rectangles in a Visio chessboard?). These were created with a connection point type of 2 ( Inward/Outward), so that the checkers […]