Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple drawing

Mathias Nilsson
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I can't get this simple drawing thing to work. I'm drawing a Line. But I want it to look like a rectangle. ( Rotated rectangle ) I can't get this to work. My math isn't what It should I guess because I can't get the rectangle to draw correctly. From two points I want to draw a rotated rectangle.

I must be able to move the line and grab hotpots in the end of the line and rotate it.
I have got it to work with plain rectangles but the line with border is harder.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic