|
-
Sep 28th, 2012, 11:16 AM
#1
[RESOLVED] calculating columnIndex, rowIndex from point
i have a picturebox that has a hexagon grid drawn on it:

at runtime, as i move my mouse over the picturebox, i want to calculate the columnIndex + rowIndex that contains the mousePointer.
the cells are hexagonal 25 pixels wide * 23 pixels tall.
these are the polygon points that describe a cell:
Dim points() As Point = {New Point(12, 0), New Point(25, 5), New Point(25, 18), New Point(12, 23), New Point(0, 18), New Point(0, 5)}
to draw the grid, i use the array of points for each cell, with an offset.
thanks for any help
Last edited by .paul.; Sep 28th, 2012 at 11:19 AM.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Sep 28th, 2012, 01:30 PM
#2
Re: calculating columnIndex, rowIndex from point
nevermind... i resolved it...
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|