Hi,

You have to derived from Canvas3D and override the postRender() method
and do
your drawing operations in it.

  public void postRender() {
    super.postRender();
    Rectangle2D shape =  new Rectangle2D.Double((getWidth() - 70.0)/2.0,
(getHeight() - 70.0)/2.0, 70.0, 70.0);
    J3DGraphics2D g = getGraphics2D();
    g.draw(shape);
    g.setComposite(AlphaComposite.Src);
    g.flush(true);
  }

David.

Patricio Inostroza wrote:

> Hi,
>
> Somebody have an example and/or some hints of the Graphics2D
> operations in Java3D?
>
> something like:
>
> ...
> Canvas3D c = new Canvas3D (config);
> ....
> J3DGraphics2D g2d = canvas.getGraphics2D();
> ...
>
> // and now I want to draw in 2D... but, how ? where ?
>
> Thank you
>
> Pato I.
> [EMAIL PROTECTED]
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

______________________________________________________________________________
message envoye depuis http://www.ifrance.com
emails (pop)-sites persos (espace illimite)-agenda-favoris (bookmarks)-forums
Ecoutez ce message par tel ! : 08 92 68 92 15 (france uniquement)

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

Reply via email to