Hi everybody,
I am a programmer, but unfortunately I am not very good in Geometry and I
have the following problem:
I want to add a small circle at the end of a line. Whenever I drag the
line, with my mouse or rotate it around, I want the circle to get
updated appropriately and to be at the end of that line.
Example:
Start point End point
and the circle
|
| |
| |
V V
-------------------------------------o
(something like that)
I am writing that code in Java 1.1 ( I hope noone gets offended) and it's
almost ready, except for that little smart calculation part, where I have
to find out where exactly to draw the circle, based on the coordinates
of the edge's start and end points, which are passed to me, everytime
the edge (line) is moved or rotated. To make things even more
interesting, in Java the function for drawing circles has the following
prototype:
drawOval(int x, int y, int width, int height)
where:
these coordinates specify a rectangle, in which my circle (ellipse)
should fit.
I am really confused about how to choose that x,y point, that I should
pass to the above function, based on the start,end point coordinates of
the line.
Thank you. Please Help.
Sincerely
mich
P.S.
How can I join the newsgroup?
- calling convention for merging asm&C Tuukka Toivonen
- Re: calling convention for merging asm&C Andrea Arcangeli
- Re: calling convention for merging asm&C Glynn Clements
- Re: calling convention for merging asm&C Andrea Arcangeli
- Re: calling convention for merging asm&a... Glynn Clements
- Re: calling convention for merging ... Andrea Arcangeli
- Re: calling convention for merg... Andrea Arcangeli
- Re: A Geometric Java Problem Mihail Mihaylov
- Re: A Geometric Java Problem James
- Re: A Geometric Java Problem Glynn Clements
- Re: A Geometric Java Problem Mihail Mihaylov
- passing args in regs speed (was:something else) Tuukka Toivonen
- Re: passing args in regs speed (was:somethin... Andrea Arcangeli
- Re: passing args in regs speed (was:somethin... Glynn Clements
- Re: passing args in regs speed (was:somethin... Marc Lehmann
- Re: passing args in regs speed (was:some... Andrea Arcangeli
- Re: calling convention for merging asm&C Glynn Clements
- Re: calling convention for merging asm&C Tuukka Toivonen
