Hi Tina,

>X-Unix-From: [EMAIL PROTECTED]  Tue Jul 10 07:09:21 2001
>Delivered-To: [EMAIL PROTECTED]
>X-Sender: ceetm2@odin
>MIME-Version: 1.0
>Date: Tue, 10 Jul 2001 15:08:04 +0100
>From: Tina Manoharan Valappil <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Background Image
>To: [EMAIL PROTECTED]
>
>
>
>        Hi all,
>
>        I am applying an image to the background this way:
>
>        Background sky = new Background(0.8627f, 0.9451f, 0.9529f);
>        String skyFile = "/texture/bg.jpg";
>        URL skyURL = Beta.this.getClass().getResource(skyFile);
>        TextureLoader skyLoader = new TextureLoader(skyURL,
>                                        new String("RGB"), this);
>        ImageComponent2D skyImage = skyLoader.getImage();
>        sky.setImage(skyImage);
>
>        But then the image is not filling the entire background, there is
>        a gap on the right side as you can see in the attachment.
>
>        Can someone please tell me why that is happening?
>
>        Thanks
>        tina

This is correct behavior in v1.2.1
In the next v1.3 release a new function
is added in the specification :

Background

 public void setImageScaleMode(int imageScaleMode)
 where imageScaleMode is one of :

 SCALE_NONE     (default as in v1.2)
 SCALE_FIT_MIN
 SCALE_FIT_MAX
 SCALE_FIT_ALL    <= this may be what you want
 SCALE_REPEAT
 SCALE_NONE_CENTER

- Kelvin
--------------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
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