• Post Reply Bookmark Topic Watch Topic
  • New Topic

A question that is not final but is my final question about AffineTransforms - hopefu

 
Kieran Murray
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I think if I can answer this I will have about wrapped it up for my Drawing Canvas.
I can now dynamically draw a line on a canvas - yippee.
I can also lengthen or shorten the line.

The only problem is when I lengthen or shorten the line and the line has been translated on the canvas before then the start point of the line - when it is being lengthened returns to its original start point - where it was before I moved it a couple of minutes ago.

I am pretty sure this is because my methods under the boolean tranLineExtending do not take into account that the line has previously been
Affine transformed.

Would one of you guys mind taking a look at the code snippets.
Any suggestions would be most gratefully appreciated.



Kind regards,

Kieran
[ August 04, 2008: Message edited by: Rob Prime ]
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kieran,

Could you please reduce the number of enters in your code? I don't know if you insert those manually or if something just goes wrong while copy-pasting from your IDE / editor, but it really makes your posts long.

I've removed several enters your post, and the code part has been reduced from 249 lines to 127 - a reduction of almost 50%.
 
Kieran Murray
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I managed to solve this problems by continuously updating the start point and end point of my line so that I know where the start point of the line is always.

That now works.

I am going to send the zoom method - because unfortunately this is moving my cursor out slightly and this is having a knock on effect when I redraw the line when zoomed.

If this one can be solved then it really is good night Vienna.

Kind regards,

Kieran

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!