[JAVA2D] Forte, Sun ONE Studio 4 BUG?

2003-02-09 Thread Ramón Talavera



Hello,
I have been using Forte for Java since 
version 1.0, now I am using SUN ONE STUDIO 4 update 1.

I heva been working in a JAVA project for 
half a year and now I find that Forte is hungingeverytime I try 
to
debug the application. The App is a simple 
one, no networking or EJBs are involved. 

Has anyone seen this? Has anyone fixed it? 
What debugger do you suggest me using?

Thanks
RDT


[JAVA2D] Hardcoded images

2003-01-06 Thread Ramón Talavera



How may I hardcode an image?

Thanks.


[JAVA2D] Component paint onto Graphics

2003-01-05 Thread Ramón Talavera



Hello,
I am trying to paint a JButton directly onto 
a Graphics2D with B.paintComponent(g)
, but it seems not to be accepting the 
getX(),getY() coordinates of the component 
so it places it at 0,0. 
After using g.translate(getX(),getY()) I get the 
"mapped" JButton on its correct position, but the size is not
the size of the setBounds... it is the original 
JButton size.

Is there a way to map a Component onto a Graphics 
directly, I mean not having to paint a 'version' or the original
by using g.drawrect and so on?

Thanks,
R.D. Talavera


Re: [JAVA2D] STROKE_CONTROL

2002-11-26 Thread Ramón Talavera
Aha, I see, thanks Jim :) !
 So to get the outer border I should create the same area with a bigger
stroke and then substract the original area from that one , is that so?

Nice to meet people like you,
Sincerely,
 Ramón
- Original Message -
From: Jim Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 12:34 AM
Subject: Re: [JAVA2D] STROKE_CONTROL


Hi Ramón,

Use the Area class to either subtract or intersect the original shape
with/from the outline created with BasicStroke.createStrokedShape().
Intersection will produce the inside part, subtract will produce the
outside part.

As far as non-convex polygons, you will probably find lots of cases
where for a very convoluted self-intersecting or self-touching polygon
and a very wide outline width there will be lots of visual anomalies
which make the result look wrong because some part of the path
overlapped in a way that wasn't intuitive.  I believe the results will
be correct, they just might be surprising (as with many things in
geometry... ;-)

...jim

--On Tuesday, November 26, 2002 12:11 AM +0100 Ramón Talavera
[EMAIL PROTECTED] wrote:

 For an outside border that is quite easy, the mask way works fine.
 For an outside border things change, as I have to scale the main
 Polygon and draw it again to have the
 outside borderline: Problem: the polygon center, if it is a regular
 polygon the center of mass works fine, but if the polygon is
 non-convex then there are problems and many borders dissapear.

 ¿Any ideas?
 I can post images if you wish :).

 Thanks,
  Ramón Talavera
 - Original Message -
 From: Dave Kavanagh [EMAIL PROTECTED]
 To: Ramón Talavera [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, November 25, 2002 11:12 PM
 Subject: Re: [JAVA2D] STROKE_CONTROL


 I don't think there is a flag you can set or something easy like that.
 You could double the stroke width and set up a clip to either mask
 off the inside or the outside of the shape you wish to outline.

 David
 Quoting Ramón Talavera [EMAIL PROTECTED]:

  I am trying to draw a 2D polygon with a border stroke with a width
  of 2.0, but I want those 2.0 to go completely inside the polygon
  borderline, I
 mean,
  normally half the line width goes outside and the other half goes
  inside,
 but
  I want to have it completely outside or completely inside, anyone
  know how
 I
  can get this effect?
 
  Thanks in advance,
   Ramón Talavera

 =
 == To unsubscribe, send email to [EMAIL PROTECTED] and
 include in the body of the message signoff JAVA2D-INTEREST.  For
 general help, send email to [EMAIL PROTECTED] and include in the
 body of the message help.

=
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.



[JAVA2D] STROKE_CONTROL

2002-11-25 Thread Ramón Talavera



I am trying to draw a 2D polygon with a border 
stroke with a width of 2.0, but I want those 2.0 to go completely inside the 
polygon borderline, I mean, normallyhalf the line width goes outside and 
the other half goes inside, but I want to have it completely outside or 
completely inside, anyone know how I can get this effect?

Thanks inadvance,
Ramón 
Talavera


Re: [JAVA2D] STROKE_CONTROL

2002-11-25 Thread Ramón Talavera
For an outside border that is quite easy, the mask way works fine.
For an outside border things change, as I have to scale the main Polygon and
draw it again to have the
outside borderline: Problem: the polygon center, if it is a regular polygon
the center of mass works fine, but if the polygon is non-convex then there
are problems and many borders dissapear.

¿Any ideas?
I can post images if you wish :).

Thanks,
 Ramón Talavera
- Original Message -
From: Dave Kavanagh [EMAIL PROTECTED]
To: Ramón Talavera [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 25, 2002 11:12 PM
Subject: Re: [JAVA2D] STROKE_CONTROL


I don't think there is a flag you can set or something easy like that.
You could double the stroke width and set up a clip to either mask off the
inside or the outside of the shape you wish to outline.

David
Quoting Ramón Talavera [EMAIL PROTECTED]:

 I am trying to draw a 2D polygon with a border stroke with a width of 2.0,
 but I want those 2.0 to go completely inside the polygon borderline, I
mean,
 normally half the line width goes outside and the other half goes inside,
but
 I want to have it completely outside or completely inside, anyone know how
I
 can get this effect?

 Thanks in advance,
  Ramón Talavera

===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST.  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message help.