• 0

[JAVA] How to draw boundary lines with user define shaped


Question

Hi guys!

I am wondering anyone knows how can i draw boundary lines with user defined shaped evenly spread. Something like this..

X -- X -- X -- X -- X -- X

or

| -- | -- | -- | -- | -- |

Basically, the user can define either X or | or something else and then the user will draw a boundary line regardless if its a circle, square or a straight line or whatever and then with the user defined shape, it will evenly be spread along the boundary line.

Is there any ready made library i can use out there or if i were to code, where do i start?

Thanks!

Regards

Don Chen

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

This would be a function of the drawing library, the one that comes with Java should handle it.

When drawing the path, you can add sub-paths to it (like the user defined shape), you'd have to work out the distance yourself though (fairly easy)

Link to comment
Share on other sites

  • 0

I understand that the draw line function can have different line styles like dotted, dash, long dash dot, double dot and so on.

Is there a way i can implement my own line styles? like maybe - X - ?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.