Skip to content
Advertisement

Tag: 2d

Read a text file to create a 2D Array in Java

I have a text file with first line will be the size of the board and the remaining values will be the values of p row by row. All values are separated by whitespace. For example: 5 2 5 10 3 5 4 6 9 12 3 11 5 9 7 7 7 2 4 8 19 2 6 8

Obtain ordered vertices of GeneralPath

How can I obtain the vertices of a GeneralPath object? It seems like this should be possible, since the path is constructed from points (lineTo, curveTo, etc). I’m trying to create a double[][] of point data (an array of x/y coordinates). Answer You can get the points back from the PathIterator. I’m not sure what your constraints are, but if

Advertisement