I have difficulties to visualize the BlockMap class in my mind,
BlockCount : the size of the block
CornerCount : the size of the corner block
AllBlocks : the block rectangle in Cartesian Coordinate
AllCorners : the corner block rectangle in Cartesian Coordinate
Corners : ?
BlockAreas : ?
BlockCenters : ?
CornerAreas : ?
Would you give me hints about it ?
Try to render it to bitmap then :-) That will make it easy to visualize.
I know it would take time, so here's a quick explanation instead. BlockMap
represents an NxM checkerboard. Its properties then mean the following:
Corners : (N+1)x(M+1) corners of checkerboard fields
BlockAreas : NxM rectangles describing location and size of each field on the
BlockCenters : NxM points representing centers of checkerboard fields
CornerAreas : tricky, see below
CornerAreas represents secondary checkerboard (let's call it B) overlaid on
top of the original checkerboard (let's call it A). Imagine making a copy of
checkerboard A and shifting it by half of a field right and down. B's corners
are now where A's centers are. Checkerboard B has 1 extra row and 1 extra
column, because it contains half-size fields on all its 4 sides.
If you cannot understand it after this explanation, I suggest rendering it so
that you can see for yourself.
thanks for your explanation.
I'm trying to figure out from the code. It looks like Corners is the PointGrid
structure that holds the block point, BlockAreas is the RectangleGrid
structure that returns Cartesian coordinates for each point, BlockCenters
holds the center block point, CornerAreas returns the center block point
coordinates with top and left half of the field, right and bottom one and half
of the field. All of it NxM. Is this what you meant ?
You are wrong in several points. I suggest you render it into bitmap after
all. It will be much faster than email ping-pong.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.